|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unido.ls5.eti.client.EtiConnectionSepp
public class EtiConnectionSepp
A jETI-connection for SEPP, the Streaming Eti Performance Protocol. SEPP is a very simple byte-monging TCP-based protocol.
Constructor Summary | |
---|---|
EtiConnectionSepp(URI uri)
Saves the URI for later use and creates temporary directory. |
Method Summary | |
---|---|
void |
endSession()
Ends the currently used session. |
void |
exec(String tool,
Map<String,String> parameters)
Execute the given tool 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)
Delegate to forward(Set, EtiConnection) . |
void |
forward(Set<String> filenames,
EtiConnection toServer)
Tell the server to forward the specified files to another server. |
URI |
getServerURI()
Retrieve the server's URI of this connection |
String |
getSession()
Retrieve the sessionId of this connection. |
void |
login(String username,
String password)
Create a session on the server. |
List<VirtualFile> |
retrieve(List<String> filenames)
Delegate to retrieve(Set) . |
Set<VirtualFile> |
retrieve(Set<String> filenames)
Retrieve the named files from the server. |
VirtualFile |
retrieve(String filename)
Delegates to retrieve(Set) . |
void |
setSession(String sessionId)
Sets the session ID of this connection. |
void |
store(List<VirtualFile> files)
Delegate to store(Set) . |
void |
store(Set<VirtualFile> files)
Store the named files on the server. |
void |
store(VirtualFile file)
Delegates to store(Set) . |
String |
toString()
Returns "EtiConnectionSepp($sessionid)". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EtiConnectionSepp(URI uri)
uri
- The endpoint of this Connection.Method Detail |
---|
public void endSession() throws EtiLocalException, EtiRemoteException
endSession
in interface EtiConnection
EtiLocalException
- if the error occured on client-side
EtiRemoteException
- if the Error was generated by the jETI Serverpublic void exec(String tool, Map<String,String> parameters) throws EtiLocalException, EtiRemoteException
exec
in interface EtiConnection
tool
- the tool to execute.parameters
- the key-value-paired parameters to use.
EtiLocalException
- if anything goes wrong with the connection (IOException
).
EtiRemoteException
- if the server sends an error code and message.public List<VirtualFile> retrieve(List<String> filenames) throws EtiLocalException, EtiRemoteException
retrieve(Set)
.
retrieve
in interface EtiConnection
filenames
- List of virtual filenames to retrieve.
EtiLocalException
- if something goes wrong on client side.
EtiRemoteException
- if something goes wrong on server side.public Set<VirtualFile> retrieve(Set<String> filenames) throws EtiLocalException, EtiRemoteException
retrieve
in interface EtiConnection
filenames
- the files to retrieve.
EtiLocalException
- if anything goes wrong with the connection (IOException
).
EtiRemoteException
- if the server sends an error code and message.public void store(List<VirtualFile> files) throws EtiLocalException, EtiRemoteException
store(Set)
.
store
in interface EtiConnection
files
- the list of files to store
EtiLocalException
- if something goes wrong on client side.
EtiRemoteException
- if something goes wrong on server side.public void store(Set<VirtualFile> files) throws EtiLocalException, EtiRemoteException
store
in interface EtiConnection
files
- the files to send.
EtiLocalException
- if anything goes wrong with the connection (IOException
).
EtiRemoteException
- if the server sends an error code and message.public void forward(List<String> filenames, EtiConnection toServer) throws EtiLocalException, EtiRemoteException
forward(Set, EtiConnection)
.
forward
in interface EtiConnection
filenames
- list of virtual filenames that shall be forwarded.toServer
- An existing connection to the server where the files shall
be forwarded to.
EtiLocalException
EtiRemoteException
public void forward(Set<String> filenames, EtiConnection toServer) throws EtiLocalException, EtiRemoteException
forward
in interface EtiConnection
filenames
- the files to forward.toServer
- the server to send the files to.
EtiLocalException
- if anything goes wrong with the connection (IOException
).
EtiRemoteException
- if the server sends an error code and message.public URI getServerURI()
EtiConnection
getServerURI
in interface EtiConnection
public String getSession()
EtiConnection
getSession
in interface EtiConnection
public void login(String username, String password) throws EtiLocalException, EtiRemoteException
login
in interface EtiConnection
username
- the username to send.password
- the password to send.
EtiLocalException
- if anything goes wrong with the connection (IOException
).
EtiRemoteException
- if the server sends an error code and message.public void setSession(String sessionId)
EtiConnection
setSession
in interface EtiConnection
sessionId
- the session Id to set.public void exec(String tool, String... parameters) throws EtiLocalException, EtiRemoteException
EtiConnection
EtiConnection.exec(String, Map)
(depending on implementation).
exec
in interface EtiConnection
parameters
- alternating key,value,key,value,... sequence of parameters
EtiLocalException
- if size of parameters is not even
EtiRemoteException
public VirtualFile retrieve(String filename) throws EtiLocalException, EtiRemoteException
retrieve(Set)
.
retrieve
in interface EtiConnection
filename
- virtual filename to retrieve.
EtiLocalException
- if something goes wrong on client side.
EtiRemoteException
- if something goes wrong on server side.public void store(VirtualFile file) throws EtiLocalException, EtiRemoteException
store(Set)
.
store
in interface EtiConnection
file
- the file to store
EtiLocalException
- if something goes wrong on client side.
EtiRemoteException
- if something goes wrong on server side.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |