|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is an interface that all application type systems must conform to for the communication threads to work with it.
ApplicationHandler| Method Summary | |
void |
addReceivedPacket(Packet packet)
Called by the ReceiveThread when a packet has been received. |
void |
directPacket(Packet packet)
Called by the ReceiveThread when a packet has been received. |
void |
forwardEventPacket(Packet packet)
Called by the EventThread when a packet has been received. |
Log |
getLog()
Returns the Log object. |
ApplicationInterface |
getModalObject()
Returns the current object which is receiving all input packets. |
CoreInterface |
getParentServer()
Returns the original server which started this ApplicationInterface. |
int |
getValidId()
This function allocates a valid unused ID from a pool of ID's held within the Application. |
boolean |
isConnected()
This function returns the state of the application handler. |
void |
restart(java.net.Socket newConnection)
This function restarts the functioning of the ApplicationInterface. |
void |
sendPacket(Packet packet)
Writes a packet to the output stream. |
void |
setConnectedState(boolean state)
This function will force the application to go active/inactive. |
void |
setLog(Log logFile)
Sets the Log for this ApplicationInterface. |
void |
setModalObject(ApplicationInterface object)
Sets the current object which is to receive all input packets. |
void |
setParentServer(CoreInterface server)
Sets the original server which started this ApplicationInterface. |
void |
shutDown()
This function attempts to shut down the page handler gracefully. |
void |
shutDownClient()
This function will force the client to shut down. |
void |
shutDownClient(java.lang.String message)
This function will force the client to shut down. |
void |
start(java.net.Socket newConnection)
This function initiates the functioning of the ApplicationInterface. |
| Method Detail |
public void forwardEventPacket(Packet packet)
throws ApplicationException
packet - Packet to forward to the specified component.
public void start(java.net.Socket newConnection)
throws java.lang.IllegalThreadStateException
newConnection - The Socket which is connected to the page in operation. If null uses the connection already set.java.lang.IllegalThreadStateException - containing any problems.
public void restart(java.net.Socket newConnection)
throws java.lang.IllegalThreadStateException
newConnection - The Socket which is connected to the page in operation. If null uses the connection already set.java.lang.IllegalThreadStateException - containing any problems.public void addReceivedPacket(Packet packet)
packet - Packet to forward to the specified component.public CoreInterface getParentServer()
public void setParentServer(CoreInterface server)
server - CoreInterface which is the parent server.public Log getLog()
public void setLog(Log logFile)
logFile - Log object for logging.public void shutDown()
public ApplicationInterface getModalObject()
public void setModalObject(ApplicationInterface object)
object - ApplicationInterface which is the modal object.
public void directPacket(Packet packet)
throws ApplicationException
packet - Packet to forward to the specified component.ApplicationException - containing errors.public boolean isConnected()
public void sendPacket(Packet packet)
throws ApplicationHandlerException
packet - Packet which will be written to the remote browser.amber.server.applicationException - containing error information
public int getValidId()
throws ApplicationHandlerException
ApplicationHandlerException - should
the component ID overflow the maximum allowed.
public void shutDownClient()
throws ApplicationHandlerException
ApplicationHandlerException - should
there be a messaging error.
public void shutDownClient(java.lang.String message)
throws ApplicationHandlerException
message - String optional message which the client will display
in a message box when the client is closed. A null value sends no
message and silently shuts down the client.ApplicationHandlerException - should
there be a messaging error.public void setConnectedState(boolean state)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||