se.entra.phantom.server
Interface ClientSessionInterface

All Known Implementing Classes:
ClientSession

public interface ClientSessionInterface

This interface is implemented by the ClientSession in order to interact with the session running on the client side.


Method Summary
 void clientTrace(String text)
          Performs a trace output (normally after a call to doClientVerboseTrace.
 Transaction createTransaction()
          Called to create a transaction that will later on be sent to the client.
 void displayTerminal()
          Creates the terminal window, gets the contents of the terminal window, hides all the panels, and displays it.
 void dispose()
          Disposes of the client session.
 boolean doClientVerboseTrace()
          Checks if client verbose trace is turned on.
 boolean doesScreenContainData()
          Checks if the host screen contains data.
 boolean exitApplication()
          Exits the current client session.
 void flagClientEventForProcessing()
          Flags a client event to be processed asynchronously.
 void flagHostEventForProcessing()
          Flags a host event to be processed asynchronously.
 ClientCommunicationInterface getClientCommunicationInterface()
          Gets the client communication interface..
 ClientConnectionData getClientConnectionData()
          Gets the client connection data.
 ClientWorker getClientWorker()
          Get client worker.
 HostSession getCurrentHostSession()
          Gets the current host session.
 HostScreen getHostScreen()
          Gets the host screen.
 HostSessionManager getHostSessionManager()
          Gets the host session manager.
 Transaction getModalReturnCode(int replyType)
          Gets the return code (Transaction) for a modal server-client request.
 VirtualSessionManager getVirtualSessionManager()
          Gets the VirtualSessionManager.
 boolean hasJavaClient()
          Checks if this session is connected to a NetPhantom Java Client.
 boolean isClientTerminalDisplayed()
          Checks if the client is displaying the terminal window.
 boolean isHostInErrorState()
          Checks if the current host session is in error state.
 boolean isHostLocked()
          Checks if the current host session is locked.
 boolean isMainThread()
          Checks if the current calling thread is the main thread.
 void logEvent(int id)
          Logs an event for the client.
 void logEvent(int id, String param)
          Logs an event for the client.
 void postClientTransaction(Transaction trans)
          Posts a client transaction for processing.
 void processCheckInactivity(int inactivityWarning, int inactivityTimeout)
          Checks if a warning message should be displayed on the client due to inactivity or if the session should be closed.
 void processClientEvent()
          Process a new client event.
 void processClientTransaction(Transaction trans)
          Processes events posted to the client worker for processing in the virtual session manager.
 void processHostEvent()
          Process a new host event.
 void removeTerminal()
          Removes the terminal window and displays all the panels again.
 void sendTransaction(Transaction trans)
          Called to send a transaction to the client.
 void setModalReturnCode(Transaction trans)
          Sets the return code for a server-client request (message box).
 void soundAlarm()
          Called to issue an alarm on the client side.
 boolean waitForScreenChange(long msTime)
          Waits for a screen change for a certain time.
 boolean waitForUnlock(long msTime)
          Waits for the lock state to disapear for a certain time.
 

Method Detail

soundAlarm

void soundAlarm()
Called to issue an alarm on the client side.


createTransaction

Transaction createTransaction()
Called to create a transaction that will later on be sent to the client.


sendTransaction

void sendTransaction(Transaction trans)
Called to send a transaction to the client.


setModalReturnCode

void setModalReturnCode(Transaction trans)
Sets the return code for a server-client request (message box). This method should be called only from the VirtualSessionManager client transaction reader thread.


getModalReturnCode

Transaction getModalReturnCode(int replyType)
Gets the return code (Transaction) for a modal server-client request.


waitForScreenChange

boolean waitForScreenChange(long msTime)
Waits for a screen change for a certain time. Note that if the wait-time is negative, an "indefinite" wait will be done. The time is in milliseconds. This method will return true if there has been any kind of screen change since the last call to this routine.

Returns:
true = success, false = time-out.

isHostLocked

boolean isHostLocked()
Checks if the current host session is locked.


isHostInErrorState

boolean isHostInErrorState()
Checks if the current host session is in error state.


getHostScreen

HostScreen getHostScreen()
Gets the host screen.


getCurrentHostSession

HostSession getCurrentHostSession()
Gets the current host session.


waitForUnlock

boolean waitForUnlock(long msTime)
Waits for the lock state to disapear for a certain time. Note that if the wait-time is negative, an "indefinite" wait will be done. The time is in milliseconds.

Returns:
true = success, false = time-out.

isMainThread

boolean isMainThread()
Checks if the current calling thread is the main thread. Main threads are not allowed to wait for screen/host changes.


logEvent

void logEvent(int id)
Logs an event for the client.


logEvent

void logEvent(int id,
              String param)
Logs an event for the client.


hasJavaClient

boolean hasJavaClient()
Checks if this session is connected to a NetPhantom Java Client.


exitApplication

boolean exitApplication()
Exits the current client session.

The connection to the client will be closed and the terminal sessions stopped. The session will then be restarted for use by another client session.


dispose

void dispose()
Disposes of the client session.


doClientVerboseTrace

boolean doClientVerboseTrace()
Checks if client verbose trace is turned on.


clientTrace

void clientTrace(String text)
Performs a trace output (normally after a call to doClientVerboseTrace.


getClientConnectionData

ClientConnectionData getClientConnectionData()
Gets the client connection data.


getClientCommunicationInterface

ClientCommunicationInterface getClientCommunicationInterface()
Gets the client communication interface..


getHostSessionManager

HostSessionManager getHostSessionManager()
Gets the host session manager.


flagClientEventForProcessing

void flagClientEventForProcessing()
Flags a client event to be processed asynchronously.


flagHostEventForProcessing

void flagHostEventForProcessing()
Flags a host event to be processed asynchronously.


doesScreenContainData

boolean doesScreenContainData()
Checks if the host screen contains data.


postClientTransaction

void postClientTransaction(Transaction trans)
Posts a client transaction for processing.


displayTerminal

void displayTerminal()
Creates the terminal window, gets the contents of the terminal window, hides all the panels, and displays it.


removeTerminal

void removeTerminal()
Removes the terminal window and displays all the panels again.


isClientTerminalDisplayed

boolean isClientTerminalDisplayed()
Checks if the client is displaying the terminal window.


getVirtualSessionManager

VirtualSessionManager getVirtualSessionManager()
Gets the VirtualSessionManager.


getClientWorker

ClientWorker getClientWorker()
Get client worker.


processClientEvent

void processClientEvent()
Process a new client event.


processClientTransaction

void processClientTransaction(Transaction trans)
Processes events posted to the client worker for processing in the virtual session manager.


processHostEvent

void processHostEvent()
Process a new host event.


processCheckInactivity

void processCheckInactivity(int inactivityWarning,
                            int inactivityTimeout)
Checks if a warning message should be displayed on the client due to inactivity or if the session should be closed. This method is called by the worker thread.



Phantom® and NetPhantom® are registered trademarks of Codectica Systems SARL.
© Copyright Codectica Systems SARL, 2008. All rights reserved.