se.entra.phantom.server.rconsole
Class AdminCommandProcessor

java.lang.Object
  extended by se.entra.phantom.server.rconsole.AdminCommandProcessor
All Implemented Interfaces:
Runnable, AdminTransactions

public class AdminCommandProcessor
extends Object
implements AdminTransactions, Runnable

This class handles a remote administration session.


Field Summary
 
Fields inherited from interface se.entra.phantom.server.rconsole.AdminTransactions
APPLET_SERVERINFORMATION, LOADBALANCER_SLAVECONNECT, PHANTOM_EDITOR, RCONSOLE_APPRELOAD, RCONSOLE_APPS, RCONSOLE_BROADCAST, RCONSOLE_BROADCASTALL, RCONSOLE_BROADCASTAPP, RCONSOLE_BROADCASTCL, RCONSOLE_CLIENT, RCONSOLE_DISABLE, RCONSOLE_ENABLE, RCONSOLE_EVENT, RCONSOLE_KILL, RCONSOLE_LOCK, RCONSOLE_MEMCOMPACT, RCONSOLE_MEMORY, RCONSOLE_NOP, RCONSOLE_PEAKCLIENTCOUNT, RCONSOLE_PUT, RCONSOLE_QUIT, RCONSOLE_RESTART, RCONSOLE_RESTART_WEBSERVER, RCONSOLE_SHUTDOWN, RCONSOLE_TRACE, RCONSOLE_UPGRADE
 
Constructor Summary
AdminCommandProcessor(Socket socket, ServerAdminInterface serverAdminInterface, DefaultAdminExit listener, AdminConfigProtection ac)
          Starts a new thread to handle the admin session.
 
Method Summary
 void dispose()
          Called to perform a clean-up and dispose of the command session.
 String getCaller()
          Gets the remote caller.
 Transaction receiveTransaction()
          Reads a transaction from the client.
 void run()
          The thread runs here until the server is shut-down.
 void sendString2DArray(String[][] str)
          Sends a String[][] to the client.
 void sendStringArray(String[] str)
          Sends a String[] to the client.
 void sendTransaction(Transaction trans)
          Sends a transaction to the client.
 void setReadTimeout(int readTimeout)
          Sets the read timeout value for the socket in milliseconds, zero indicates indefinite timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminCommandProcessor

public AdminCommandProcessor(Socket socket,
                             ServerAdminInterface serverAdminInterface,
                             DefaultAdminExit listener,
                             AdminConfigProtection ac)
                      throws IOException
Starts a new thread to handle the admin session.

Throws:
IOException - for socket failure or for string failure.
Method Detail

dispose

public void dispose()
Called to perform a clean-up and dispose of the command session.


setReadTimeout

public void setReadTimeout(int readTimeout)
Sets the read timeout value for the socket in milliseconds, zero indicates indefinite timeout. When non-zero, if there is a problem in reading the data from the socket, an empty transaction will be sent to the other end of socket to check the connection.


run

public void run()
The thread runs here until the server is shut-down.

Specified by:
run in interface Runnable

getCaller

public String getCaller()
Gets the remote caller.


receiveTransaction

public Transaction receiveTransaction()
                               throws IOException
Reads a transaction from the client. This call is blocking until the transaction has been read.

Returns:
null if the socket is closed.
Throws:
IOException

sendTransaction

public void sendTransaction(Transaction trans)
Sends a transaction to the client. This call is blocking until the transaction has been sent.


sendStringArray

public void sendStringArray(String[] str)
Sends a String[] to the client. This call is blocking until the transaction has been sent.


sendString2DArray

public void sendString2DArray(String[][] str)
Sends a String[][] to the client. This call is blocking until the transaction has been sent.



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