|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.connect.Connection
Represents a connection to a remote resource.
Currently this resource is defined to provide access to a virtual
filesystem as provided by the getRoot()
method.
This functionality may be broadened or narrowed in the future.
When constructed, a Connection should be live, and hopefully remain
so until logOut()
is called.
Constructor Summary | |
protected |
Connection()
Constructs a connection with no information. |
protected |
Connection(Connector connector,
Map keys)
Constructs a connection recording the circumstances under which it was created. |
Method Summary | |
Object |
getAuthValue(AuthKey key)
Returns the value for a given authorization key used when opening this connection, if known |
Connector |
getConnector()
Returns the connector which generated this connection, if known. |
abstract Branch |
getRoot()
Returns the root of the remote filesystem provided by this connection. |
abstract boolean |
isConnected()
Indicates whether this connection is currently up and running. |
abstract void |
logOut()
Closes this connection. |
void |
setLogoutOnExit(boolean tidy)
Controls whether an attempt is made to shut down this connection when the JVM exits if it has not been done within the program. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Connection()
protected Connection(Connector connector, Map keys)
connector
- Connector which generated this connectionkeys
- AuthKey
-> value map giving the set of
authorization values used when opening this connectionMethod Detail |
public Object getAuthValue(AuthKey key)
key
- authorization key
public Connector getConnector()
public abstract boolean isConnected()
logOut()
has been called,
but it's possible that the connection may expire for some reason
before that.
public abstract void logOut() throws IOException
IOException
public abstract Branch getRoot()
public void setLogoutOnExit(boolean tidy)
isConnected()
returns true
an attempt is made to call logOut()
. Note this might
cause JVM shutdown to be prolonged. This is set false by
default.
tidy
- true if you want this connection to be shut down on exitpublic String toString()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |