de.unido.ls5.eti.client
Interface EtiConnection

All Known Implementing Classes:
EtiConnectionSepp

public interface EtiConnection

EtiConnection.

Rating red

Method Summary
 void endSession()
          End session at jETI server and delete all stored files
 void exec(String tool, Map<String,String> parameters)
          Executes tool at the server with the given parameters.
 void exec(String tool, String... parameters)
          Executes tool at the server with the given parameter.
 void forward(List<String> filenames, EtiConnection toServer)
          Deprecated. use forward(Set, EtiConnection) instead.
 void forward(Set<String> filenames, EtiConnection toServer)
          Forwards a Set of virtual files from the server represented by this connection to the server represented by the toServer connection.
 URI getServerURI()
          Retrieve the server's URI of this connection
 String getSession()
          Retrieve the sessionId of this connection.
 void login(String username, String password)
          Log in to the jETI toolserver with given username and password.
 List<VirtualFile> retrieve(List<String> filenames)
          Deprecated. use retrieve(Set) intead.
 Set<VirtualFile> retrieve(Set<String> filenames)
          Retrieve the requested files from the server.
 VirtualFile retrieve(String filename)
          Retrieve the requested file from the server.
 void setSession(String sessionId)
          Sets the session ID of this connection.
 void store(List<VirtualFile> files)
          Deprecated. use store(Set) instead
 void store(Set<VirtualFile> files)
          Stores the given set of files to the server
 void store(VirtualFile file)
          Stores a file to the server.
 

Method Detail

getServerURI

URI getServerURI()
Retrieve the server's URI of this connection

Returns:
the server's URI

getSession

String getSession()
Retrieve the sessionId of this connection. This should usually onyl be needed for debugging purposes.

Returns:
the session ID at the tool server

setSession

void setSession(String sessionId)
Sets the session ID of this connection. Method is needed to create a new Connection Object for an already existing Server Session, currently used by EtiServer's forward function

Parameters:
sessionId - the session Id to set.

endSession

void endSession()
                throws EtiLocalException,
                       EtiRemoteException
End session at jETI server and delete all stored files

Throws:
EtiRemoteException - if the Error was generated by the jETI Server
EtiLocalException - if the error occured on client-side

store

@Deprecated
void store(List<VirtualFile> files)
           throws EtiLocalException,
                  EtiRemoteException
Deprecated. use store(Set) instead

Stores the given List of files to the server

Parameters:
files - the list of files to store
Throws:
EtiLocalException - if something goes wrong on client side.
EtiRemoteException - if something goes wrong on server side.

store

void store(Set<VirtualFile> files)
           throws EtiLocalException,
                  EtiRemoteException
Stores the given set of files to the server

Parameters:
files - the list of files to store
Throws:
EtiLocalException - if something goes wrong on client side.
EtiRemoteException - if something goes wrong on server side.

store

void store(VirtualFile file)
           throws EtiLocalException,
                  EtiRemoteException
Stores a file to the server. This is a convenience method for store(Set), if only one single file has to be sent to the server.

Parameters:
file - the file to store
Throws:
EtiLocalException - if something goes wrong on client side.
EtiRemoteException - if something goes wrong on server side.

retrieve

@Deprecated
List<VirtualFile> retrieve(List<String> filenames)
                           throws EtiLocalException,
                                  EtiRemoteException
Deprecated. use retrieve(Set) intead.

Retrieve the requested files from the server.

Parameters:
filenames - List of virtual filenames to retrieve.
Returns:
the retrieved files
Throws:
EtiLocalException - if something goes wrong on client side.
EtiRemoteException - if something goes wrong on server side.

retrieve

Set<VirtualFile> retrieve(Set<String> filenames)
                          throws EtiLocalException,
                                 EtiRemoteException
Retrieve the requested files from the server.

Parameters:
filenames - List of virtual filenames to retrieve.
Returns:
the retrieved files
Throws:
EtiLocalException - if something goes wrong on client side.
EtiRemoteException - if something goes wrong on server side.

retrieve

VirtualFile retrieve(String filename)
                     throws EtiLocalException,
                            EtiRemoteException
Retrieve the requested file from the server. This is a conveniance method for retrieve(Set), if only one single file has to be retrieved.

Parameters:
filename - virtual filename to retrieve.
Returns:
the retrieved file
Throws:
EtiLocalException - if something goes wrong on client side.
EtiRemoteException - if something goes wrong on server side.

exec

void exec(String tool,
          Map<String,String> parameters)
          throws EtiLocalException,
                 EtiRemoteException
Executes tool at the server with the given parameters. Note that non-String parameters must be appropriately serialized into Strings.

Parameters:
tool - the name of the tool to execute
parameters - mapping from parameter name to value
Throws:
EtiLocalException - if something goes wrong on client side.
EtiRemoteException - if something goes wrong on server side.

exec

void exec(String tool,
          String... parameters)
          throws EtiLocalException,
                 EtiRemoteException
Executes tool at the server with the given parameter. Note that non-String parameters must be appropriately serialized into Strings. This is a convenience method using varargs that can be used in case of a few hardcoded parameters. Internally, it might simly use exec(String, Map) (depending on implementation).

Parameters:
tool -
parameters - alternating key,value,key,value,... sequence of parameters
Throws:
EtiLocalException - if size of parameters is not even
EtiRemoteException

forward

@Deprecated
void forward(List<String> filenames,
                        EtiConnection toServer)
             throws EtiLocalException,
                    EtiRemoteException
Deprecated. use forward(Set, EtiConnection) instead.

Forwards a List of virtual files from the server represented by this connection to the server represented by the toServer connection.

Parameters:
filenames - list of virtual filenames that shall be forwarded.
toServer - An existing connection to the server where the files shall be forwarded to.
Throws:
EtiLocalException
EtiRemoteException

forward

void forward(Set<String> filenames,
             EtiConnection toServer)
             throws EtiLocalException,
                    EtiRemoteException
Forwards a Set of virtual files from the server represented by this connection to the server represented by the toServer connection.

Parameters:
filenames - set of virtual filenames that shall be forwarded.
toServer - An existing connection to the server where the files shall be forwarded to.
Throws:
EtiLocalException
EtiRemoteException

login

void login(String username,
           String password)
           throws EtiLocalException,
                  EtiRemoteException
Log in to the jETI toolserver with given username and password. Note that currently (version 1.3) no authentication is required and thus any username/password combination will result in a successful login.

Parameters:
username -
password -
Throws:
EtiLocalException
EtiRemoteException