cluster5.server
Class ServerInterface4TerminalsImpl

java.lang.Object
  extended by cluster5.server.ServerInterface4TerminalsImpl
All Implemented Interfaces:
ServerInterface4Terminals
Direct Known Subclasses:
ServerInterface4UserImpl

public class ServerInterface4TerminalsImpl
extends java.lang.Object
implements ServerInterface4Terminals


Constructor Summary
ServerInterface4TerminalsImpl()
           
 
Method Summary
 void announceTerminalDown(java.lang.Long terminalId)
          Announces that a terminal has shut down.
 java.lang.Long announceTerminalUp(Terminal connectingTerminal)
          Announces that a terminal is up and passes information about itself
 byte[] getFileData(java.lang.Long sharedFileId)
           
 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 setResult(TerminalTask terminalTask)
          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
 

Constructor Detail

ServerInterface4TerminalsImpl

public ServerInterface4TerminalsImpl()
Method Detail

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 terminalTask)
               throws java.rmi.RemoteException
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

announceTerminalUp

public java.lang.Long announceTerminalUp(Terminal connectingTerminal)
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

announceTerminalDown

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

Specified by:
announceTerminalDown in interface ServerInterface4Terminals