cluster5.terminal
Class TerminalServerInterface

java.lang.Object
  extended by cluster5.terminal.TerminalServerInterface
All Implemented Interfaces:
ServerInterface4Terminals

public class TerminalServerInterface
extends java.lang.Object
implements ServerInterface4Terminals


Method Summary
 void announceTerminalDown(java.lang.Long executorId)
          Announces that a terminal has shut down.
 java.lang.Long announceTerminalUp(Terminal executor)
          Announces that a terminal is up and passes information about itself
 byte[] getFileData(java.lang.Long sharedFileId)
           
static TerminalServerInterface getInstance()
           
 TerminalTask getTask(java.lang.Long terminalId)
          Fetches a Task to process.
 java.util.List<SharedFile> listFiles()
          List files to be compared with the locals and then updated for newer versions if needed.
 void reconnect()
           
 void setResult(TerminalTask executorTask)
          Returns a Task with result, stdout and stderr listings inside.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TerminalServerInterface getInstance()

getFileData

public byte[] getFileData(java.lang.Long sharedFileId)
                   throws java.rmi.RemoteException
Specified by:
getFileData in interface ServerInterface4Terminals
Returns:
file's compressed binary data
Throws:
java.rmi.RemoteException

getTask

public TerminalTask getTask(java.lang.Long terminalId)
                     throws java.rmi.RemoteException
Description copied from interface: ServerInterface4Terminals
Fetches a Task to process.

Specified by:
getTask in interface ServerInterface4Terminals
Returns:
task to process or null if there is no pending task
Throws:
java.rmi.RemoteException

listFiles

public java.util.List<SharedFile> listFiles()
                                     throws java.rmi.RemoteException
Description copied from interface: ServerInterface4Terminals
List files to be compared with the locals and then updated for newer versions if needed. Instances do not include files' binary data.

Specified by:
listFiles in interface ServerInterface4Terminals
Returns:
list of files with no data
Throws:
java.rmi.RemoteException

setResult

public void setResult(TerminalTask executorTask)
               throws java.rmi.RemoteException,
                      java.rmi.NoSuchObjectException
Description copied from interface: ServerInterface4Terminals
Returns a Task with result, stdout and stderr listings inside.

Specified by:
setResult in interface ServerInterface4Terminals
Throws:
java.rmi.RemoteException
java.rmi.NoSuchObjectException

reconnect

public void reconnect()

announceTerminalDown

public void announceTerminalDown(java.lang.Long executorId)
                          throws java.rmi.RemoteException
Description copied from interface: ServerInterface4Terminals
Announces that a terminal has shut down.

Specified by:
announceTerminalDown in interface ServerInterface4Terminals
Throws:
java.rmi.RemoteException

announceTerminalUp

public java.lang.Long announceTerminalUp(Terminal executor)
                                  throws java.rmi.RemoteException
Description copied from interface: ServerInterface4Terminals
Announces that a terminal is up and passes information about itself

Specified by:
announceTerminalUp in interface ServerInterface4Terminals
Returns:
executor ID
Throws:
java.rmi.RemoteException