amber.type.server
Class ServerConnectionInfo

java.lang.Object
  |
  +--amber.type.server.ServerConnectionInfo
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class ServerConnectionInfo
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Field Summary
static int Active
           
static int Ended
           
static int Pending
          Status state.
 
Constructor Summary
ServerConnectionInfo()
          Default Constructor.
ServerConnectionInfo(int pageId, int pageSubId, boolean pageSubIdRequired, java.lang.String pageHandlerClass, java.lang.String information, int status, java.util.Date creationDate, long expirationTime, long startTime, ApplicationHandler pageHandler, boolean transientPage, boolean multipleConnections, boolean publicHandler, SocketData connection, boolean mailConnection, java.lang.String mailConnectionMessage, java.lang.String mailConnectionRecipient, java.lang.String mailConnectionSender, java.lang.String mailConnectionSmtpServer)
          Initialising Constructor.
ServerConnectionInfo(java.io.StreamTokenizer tokenizer)
          This constructor uses the input StreamTokenizer to fill the internal fields.
ServerConnectionInfo(java.lang.String line)
          This constructor uses the input String to fill the internal fields.
 
Method Summary
 java.lang.Object clone()
          Replicates the current object.
 boolean equals(int pageId, int pageSubId)
          This function checks to see if this object matches the input page ID and page Sub ID.
 ApplicationHandler getApplicationHandler()
          Gets the data in the following variable: The actual page handler which controls the connection.
 java.lang.String getApplicationHandlerClass()
          Gets the data in the following variable: The class name of the ApplicationHandler which will control this connection.
 SocketData getConnection()
          Gets the data in the following variable: The actual connection from the remote browser to this page handler.
 java.util.Date getCreationDate()
          Gets the data in the following variable: The time that the ApplicationHandler was queued for processing.
 long getExpirationTime()
          Gets the data in the following variable: How long the connection will exist before termination (ms).
 long getInactiveTime()
          Gets the data in the following variable: The time the connection was terminated (ms).
 java.lang.String getInformation()
          Gets the data in the following variable: The general information on the application.
 java.lang.String getMailConnectionMessage()
          Gets the data in the following variable: The mail message sent to the recipient.
 java.lang.String getMailConnectionRecipient()
          Gets the data in the following variable: The mail recipient.
 java.lang.String getMailConnectionSender()
          Gets the data in the following variable: The mail server to send to.
 java.lang.String getMailConnectionSmtpServer()
          Gets the data in the following variable: The mail server to send to.
 int getPageId()
          Gets the data in the following variable: The main page identifier for the page
 int getPageSubId()
          Gets the data in the following variable: The secondary page identifier for the page
 long getStartTime()
          Gets the data in the following variable: The time the connection initiated (ms).
 int getStatus()
          Gets the data in the following variable: The status of the connection: pending, active.
 boolean isMailConnection()
          Gets the data in the following variable: Whether mail should be sent on connection.
 boolean isMultipleConnections()
          Gets the data in the following variable: Whether multiple connections can be spawned from the one database entry.
 boolean isPageSubIdRequired()
          Gets the data in the following variable: Is the secondary page identifier for the page required.
 boolean isPublicHandler()
          Gets the data in the following variable: Whether this application can be queried by external clients.
 boolean isTransientPage()
          Gets the data in the following variable: Is the page transient or will it remain when the connection is dropped.
protected  int readToken(java.io.StreamTokenizer tok)
          Reads the next token from the stream.
 void setApplicationHandler(ApplicationHandler data)
          Sets the data in the following variable: The actual page handler which controls the connection.
 void setApplicationHandlerClass(java.lang.String data)
          Sets the data in the following variable: The class name of the ApplicationHandler which will control this connection.
 void setConnection(SocketData data)
          Sets the data in the following variable: The actual connection from the remote browser to this page handler.
 void setCreationDate(java.util.Date data)
          Sets the data in the following variable: The time that the ApplicationHandler was queued for processing.
 void setExpirationTime(long data)
          Sets the data in the following variable: How long the connection will exist before termination (ms).
 void setInactiveTime(long data)
          Sets the data in the following variable: The time the connection was terminated (ms).
 void setInformation(java.lang.String data)
          Sets the data in the following variable: The general information on the application.
 void setMailConnection(boolean data)
          Gets the data in the following variable: Whether mail should be sent on connection.
 void setMailConnectionMessage(java.lang.String data)
          Gets the data in the following variable: The mail message sent to the recipient.
 void setMailConnectionRecipient(java.lang.String data)
          Gets the data in the following variable: The mail recipient.
 void setMailConnectionSender(java.lang.String data)
          Gets the data in the following variable: The mail server to send to.
 void setMailConnectionSmtpServer(java.lang.String data)
          Gets the data in the following variable: The mail server to send to.
 void setMultipleConnections(boolean data)
          Sets the data in the following variable: Whether multiple connections can be spawned from the one database entry.
 void setPageId(int data)
          Sets the data in the following variable: The main page identifier for the page
 void setPageSubId(int data)
          Sets the data in the following variable: The secondary page identifier for the page
 void setPageSubIdRequired(boolean data)
          Sets the data in the following variable: Is the secondary page identifier for the page required.
 void setPublicHandler(boolean data)
          Sets the data in the following variable: Whether this application can be queried by external clients.
 void setStartTime(long data)
          Sets the data in the following variable: The time the connection initiated (ms).
 void setStatus(int data)
          Sets the data in the following variable: The status of the connection: pending, active.
 void setTransientPage(boolean data)
          Sets the data in the following variable: Is the page transient or will it remain when the connection is dropped.
 java.lang.String toString()
          This function returns the String form of the data.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Pending

public static final int Pending
Status state.

Active

public static final int Active

Ended

public static final int Ended
Constructor Detail

ServerConnectionInfo

public ServerConnectionInfo()
Default Constructor.

ServerConnectionInfo

public ServerConnectionInfo(int pageId,
                            int pageSubId,
                            boolean pageSubIdRequired,
                            java.lang.String pageHandlerClass,
                            java.lang.String information,
                            int status,
                            java.util.Date creationDate,
                            long expirationTime,
                            long startTime,
                            ApplicationHandler pageHandler,
                            boolean transientPage,
                            boolean multipleConnections,
                            boolean publicHandler,
                            SocketData connection,
                            boolean mailConnection,
                            java.lang.String mailConnectionMessage,
                            java.lang.String mailConnectionRecipient,
                            java.lang.String mailConnectionSender,
                            java.lang.String mailConnectionSmtpServer)
Initialising Constructor.
Parameters:
pageId - The main page identifier for the page.
pageSubId - The secondary page identifier for the page.
pageSubIdRequired - Is the secondary page identifier for the page required.
pageHandler - The class name of the ApplicationHandler which will control this connection.
information - String information on this application.
status - The status of the connection: pending, active.
creationDate - The time that the ApplicationHandler was queued for processing.
expirationTime - How long the connection will exist before termination (ms).
startTime - When the connection was initiated (ms).
pageHandler - The actual page handler which controls the connection.
transientPage - Is the page transient or will it remain when the connection is dropped.
multipleConnections - Can the page entry spawn multiple connections.
publicHandler - Can the page entry be requested by a client.
connection - SocketData connection established to this page.
mailConnection - Does the server mail on connection.
mailConnectionMessage - String message sent on connection.
mailConnectionRecipient - String recipient who receives mail.
mailConnectionSender - String person who sent the mail.
mailConnectionSmtpServer - String SMTP server to mail to.

ServerConnectionInfo

public ServerConnectionInfo(java.io.StreamTokenizer tokenizer)
                     throws java.io.IOException
This constructor uses the input StreamTokenizer to fill the internal fields.
Parameters:
tokenizer - StreamTokenizer containing the required elements.
Throws:
java.io.IOException - if the information could not be read.

ServerConnectionInfo

public ServerConnectionInfo(java.lang.String line)
                     throws java.io.IOException
This constructor uses the input String to fill the internal fields.
Parameters:
line - String containing the items as characters.
Throws:
java.io.IOException - if the information could not be read.
Method Detail

readToken

protected int readToken(java.io.StreamTokenizer tok)
                 throws java.io.EOFException,
                        java.io.IOException
Reads the next token from the stream.
Parameters:
tok - StreamTokenizer to read the token from.
Returns:
int which is the type of token read.
Throws:
java.io.IOException - if an error occurred reading the stream.
java.io.EOFException - if the end of the stream is reached.

getPageId

public int getPageId()
Gets the data in the following variable: The main page identifier for the page
Returns:
int containing the required information.

getPageSubId

public int getPageSubId()
Gets the data in the following variable: The secondary page identifier for the page
Returns:
int containing the required information.

isPageSubIdRequired

public boolean isPageSubIdRequired()
Gets the data in the following variable: Is the secondary page identifier for the page required.
Returns:
boolean containing the required information.

isTransientPage

public boolean isTransientPage()
Gets the data in the following variable: Is the page transient or will it remain when the connection is dropped.
Returns:
boolean containing the required information.

isMultipleConnections

public boolean isMultipleConnections()
Gets the data in the following variable: Whether multiple connections can be spawned from the one database entry.
Returns:
boolean containing the required information.

isPublicHandler

public boolean isPublicHandler()
Gets the data in the following variable: Whether this application can be queried by external clients.
Returns:
boolean containing the required information.

getApplicationHandlerClass

public java.lang.String getApplicationHandlerClass()
Gets the data in the following variable: The class name of the ApplicationHandler which will control this connection.
Returns:
String containing the required information.

getInformation

public java.lang.String getInformation()
Gets the data in the following variable: The general information on the application.
Returns:
String containing the required information.

getStatus

public int getStatus()
Gets the data in the following variable: The status of the connection: pending, active.
Returns:
int containing the required information.

getCreationDate

public java.util.Date getCreationDate()
Gets the data in the following variable: The time that the ApplicationHandler was queued for processing.
Returns:
Date containing the required information.

getExpirationTime

public long getExpirationTime()
Gets the data in the following variable: How long the connection will exist before termination (ms).
Returns:
long containing the required information.

getStartTime

public long getStartTime()
Gets the data in the following variable: The time the connection initiated (ms).
Returns:
long containing the required information.

getInactiveTime

public long getInactiveTime()
Gets the data in the following variable: The time the connection was terminated (ms).
Returns:
long containing the required information.

getApplicationHandler

public ApplicationHandler getApplicationHandler()
Gets the data in the following variable: The actual page handler which controls the connection.
Returns:
ApplicationHandler containing the required information.

getConnection

public SocketData getConnection()
Gets the data in the following variable: The actual connection from the remote browser to this page handler.
Returns:
SocketData containing the required information.

isMailConnection

public boolean isMailConnection()
Gets the data in the following variable: Whether mail should be sent on connection.
Returns:
boolean containing the required information.

getMailConnectionMessage

public java.lang.String getMailConnectionMessage()
Gets the data in the following variable: The mail message sent to the recipient.
Returns:
String containing the required information.

getMailConnectionRecipient

public java.lang.String getMailConnectionRecipient()
Gets the data in the following variable: The mail recipient.
Returns:
String containing the required information.

getMailConnectionSender

public java.lang.String getMailConnectionSender()
Gets the data in the following variable: The mail server to send to.
Returns:
String containing the required information.

getMailConnectionSmtpServer

public java.lang.String getMailConnectionSmtpServer()
Gets the data in the following variable: The mail server to send to.
Returns:
String containing the required information.

setPageId

public void setPageId(int data)
Sets the data in the following variable: The main page identifier for the page
Parameters:
data - int containing the data to set the variable to.

setPageSubId

public void setPageSubId(int data)
Sets the data in the following variable: The secondary page identifier for the page
Parameters:
data - int containing the data to set the variable to.

setPageSubIdRequired

public void setPageSubIdRequired(boolean data)
Sets the data in the following variable: Is the secondary page identifier for the page required.
Parameters:
data - int containing the data to set the variable to.

setTransientPage

public void setTransientPage(boolean data)
Sets the data in the following variable: Is the page transient or will it remain when the connection is dropped.
Parameters:
data - int containing the data to set the variable to.

setMultipleConnections

public void setMultipleConnections(boolean data)
Sets the data in the following variable: Whether multiple connections can be spawned from the one database entry.
Parameters:
data - int containing the data to set the variable to.

setPublicHandler

public void setPublicHandler(boolean data)
Sets the data in the following variable: Whether this application can be queried by external clients.
Parameters:
data - int containing the data to set the variable to.

setApplicationHandlerClass

public void setApplicationHandlerClass(java.lang.String data)
Sets the data in the following variable: The class name of the ApplicationHandler which will control this connection.
Parameters:
data - String containing the data to set the variable to.

setInformation

public void setInformation(java.lang.String data)
Sets the data in the following variable: The general information on the application.
Parameters:
data - String containing the data to set the variable to.

setStatus

public void setStatus(int data)
Sets the data in the following variable: The status of the connection: pending, active.
Parameters:
data - int containing the data to set the variable to.

setCreationDate

public void setCreationDate(java.util.Date data)
Sets the data in the following variable: The time that the ApplicationHandler was queued for processing.
Parameters:
data - Date containing the data to set the variable to.

setExpirationTime

public void setExpirationTime(long data)
Sets the data in the following variable: How long the connection will exist before termination (ms).
Parameters:
data - long containing the data to set the variable to.

setStartTime

public void setStartTime(long data)
Sets the data in the following variable: The time the connection initiated (ms).
Parameters:
data - long containing the data to set the variable to.

setInactiveTime

public void setInactiveTime(long data)
Sets the data in the following variable: The time the connection was terminated (ms).
Parameters:
data - long containing the data to set the variable to.

setApplicationHandler

public void setApplicationHandler(ApplicationHandler data)
Sets the data in the following variable: The actual page handler which controls the connection.
Parameters:
data - ApplicationHandler containing the data to set the variable to.

setConnection

public void setConnection(SocketData data)
Sets the data in the following variable: The actual connection from the remote browser to this page handler.
Parameters:
data - SocketData containing the data to set the variable to.

setMailConnection

public void setMailConnection(boolean data)
Gets the data in the following variable: Whether mail should be sent on connection.
Parameters:
data - boolean containing the data to set the variable to.

setMailConnectionMessage

public void setMailConnectionMessage(java.lang.String data)
Gets the data in the following variable: The mail message sent to the recipient.
Parameters:
data - String containing the data to set the variable to.

setMailConnectionRecipient

public void setMailConnectionRecipient(java.lang.String data)
Gets the data in the following variable: The mail recipient.
Parameters:
data - String containing the data to set the variable to.

setMailConnectionSender

public void setMailConnectionSender(java.lang.String data)
Gets the data in the following variable: The mail server to send to.
Parameters:
data - String containing the data to set the variable to.

setMailConnectionSmtpServer

public void setMailConnectionSmtpServer(java.lang.String data)
Gets the data in the following variable: The mail server to send to.
Parameters:
data - String containing the data to set the variable to.

equals

public boolean equals(int pageId,
                      int pageSubId)
This function checks to see if this object matches the input page ID and page Sub ID.
Parameters:
pageId - int major identifing number.
pageSubId - int minor identifing number.
Returns:
boolean true if this matches the ID's.

toString

public java.lang.String toString()
This function returns the String form of the data.
Overrides:
toString in class java.lang.Object
Returns:
String containing the string version of this class.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Replicates the current object.
Overrides:
clone in class java.lang.Object
Returns:
new copy of this object.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.