public class AcrConnection extends Connection
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
AcrConnection(AcrConnector connector)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
getAuthValue, getConnector, setLogoutOnExit, toString
public static String ACR_FILE
public static int HTTP_CHUNK
public AcrConnection(AcrConnector connector) throws IOException
connector
- connector instance which dispatched this connection,
if anyIOException
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 serviceIOException
public OutputStream getOutputStream(String outUri) throws IOException
outUri
- output URIoutUri
IOException
public static URL getServerURL() throws IOException
ACR_FILE
file in the user's
home directory.IOException
- if the URL can't be foundCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.