|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.connect.Connection
uk.ac.starlink.astrogrid.AcrConnection
public class AcrConnection
Connection to an ACR server.
Field Summary | |
---|---|
static String |
ACR_FILE
Location in the user's home directory of the ACR rendezvous file. |
static int |
HTTP_CHUNK
Number of bytes per chunk used in HTTP streamed output. |
Constructor Summary | |
---|---|
AcrConnection(AcrConnector connector)
Constructor. |
Method Summary | |
---|---|
Object |
execute(String cmd,
Object[] args)
Executes an XML-RPC command. |
boolean |
getCacheDirectories()
|
String |
getHome()
Return the URI of the user's home directory for this connection. |
OutputStream |
getOutputStream(String outUri)
Returns an output stream which can be used to write to a URI representing a location in MySpace (an Ivorn). |
Branch |
getRoot()
Returns the root of the remote filesystem provided by this connection. |
static URL |
getServerURL()
Returns the URL of the ACR server, if there is one. |
boolean |
isConnected()
Indicates whether this connection is currently up and running. |
void |
logOut()
Closes this connection. |
void |
setCacheDirectories(boolean cache)
|
Methods inherited from class uk.ac.starlink.connect.Connection |
---|
getAuthValue, getConnector, setLogoutOnExit, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static String ACR_FILE
public static int HTTP_CHUNK
Constructor Detail |
---|
public AcrConnection(AcrConnector connector) throws IOException
connector
- connector instance which dispatched this connection,
if any
IOException
Method Detail |
---|
public boolean isConnected()
Connection
Connection.logOut()
has been called,
but it's possible that the connection may expire for some reason
before that.
isConnected
in class Connection
public Branch getRoot()
Connection
getRoot
in class Connection
public void logOut()
Connection
logOut
in class Connection
public String getHome()
public boolean getCacheDirectories()
public void setCacheDirectories(boolean cache)
public Object execute(String cmd, Object[] args) throws IOException
Object[]
array.
If it represents a struct, it will be a Map
.
An IOException
will be thrown if anything goes wrong.
cmd
- fully-qualified command nameargs
- array of arguments to pass to the XML-RPC service
IOException
public OutputStream getOutputStream(String outUri) throws IOException
outUri
- output URI
outUri
IOException
public static URL getServerURL() throws IOException
ACR_FILE
file in the user's
home directory.
IOException
- if the URL can't be found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |