public class RemoteConnection extends java.lang.Object implements IRemoteConnection
IRemoteConnection.ServiceFILE_SEPARATOR_PROPERTY, LINE_SEPARATOR_PROPERTY, LOCALE_CHARMAP_PROPERTY, OS_ARCH_PROPERTY, OS_NAME_PROPERTY, OS_VERSION_PROPERTY, PATH_SEPARATOR_PROPERTY, USER_HOME_PROPERTY| Constructor and Description |
|---|
RemoteConnection(RemoteConnectionType connectionType,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionChangeListener(IRemoteConnectionChangeListener listener)
Register a listener that will be notified when this connection's status changes.
|
void |
close()
Close the connection.
|
void |
fireConnectionChangeEvent(int type)
Notify all listeners when this connection's status changes.
|
java.lang.String |
getAttribute(java.lang.String key)
Get an attribute for a connection.
|
IRemoteConnectionType |
getConnectionType()
Get the connection type of this connection
|
java.lang.String |
getName()
Get unique name for this connection.
|
java.lang.String |
getProperty(java.lang.String key)
Gets the remote system property indicated by the specified key.
|
java.lang.String |
getSecureAttribute(java.lang.String key)
Get an attribute that is stored in secure storage, such as passwords.
|
<T extends IRemoteConnection.Service> |
getService(java.lang.Class<T> service)
Get the service for this remote connection that implements the given interface.
|
IRemoteConnectionWorkingCopy |
getWorkingCopy()
Return a working copy to allow setting and changing of attributes.
|
<T extends IRemoteConnection.Service> |
hasService(java.lang.Class<T> service)
Does this connection support the given service.
|
boolean |
isOpen()
Test if the connection is open.
|
void |
open(org.eclipse.core.runtime.IProgressMonitor monitor)
Open the connection.
|
void |
removeConnectionChangeListener(IRemoteConnectionChangeListener listener)
Remove a listener that will be notified when this connection's status changes.
|
java.lang.String |
toString() |
public RemoteConnection(RemoteConnectionType connectionType, java.lang.String name)
public IRemoteConnectionType getConnectionType()
IRemoteConnectiongetConnectionType in interface IRemoteConnectionpublic <T extends IRemoteConnection.Service> T getService(java.lang.Class<T> service)
IRemoteConnectiongetService in interface IRemoteConnectionservice - the interface the required service must implementspublic <T extends IRemoteConnection.Service> boolean hasService(java.lang.Class<T> service)
IRemoteConnectionhasService in interface IRemoteConnectionservice - The service to be testedpublic java.lang.String getName()
IRemoteConnectiongetName in interface IRemoteConnectionpublic java.lang.String getAttribute(java.lang.String key)
IRemoteConnectiongetAttribute in interface IRemoteConnectionpublic java.lang.String getSecureAttribute(java.lang.String key)
IRemoteConnectiongetSecureAttribute in interface IRemoteConnectionpublic IRemoteConnectionWorkingCopy getWorkingCopy()
IRemoteConnectiongetWorkingCopy in interface IRemoteConnectionpublic java.lang.String getProperty(java.lang.String key)
IRemoteConnectiongetProperty in interface IRemoteConnectionkey - the name of the propertypublic void open(org.eclipse.core.runtime.IProgressMonitor monitor)
throws RemoteConnectionException
IRemoteConnectionopen in interface IRemoteConnectionmonitor - the progress monitor to use for reporting progress to the user. It is the caller's responsibility to call done()
on the given monitor. Accepts null, indicating that no progress should be reported and that the operation cannot
be cancelled.RemoteConnectionExceptionpublic void close()
IRemoteConnectionclose in interface IRemoteConnectionpublic boolean isOpen()
IRemoteConnectionisOpen in interface IRemoteConnectionpublic void addConnectionChangeListener(IRemoteConnectionChangeListener listener)
IRemoteConnectionaddConnectionChangeListener in interface IRemoteConnectionpublic void removeConnectionChangeListener(IRemoteConnectionChangeListener listener)
IRemoteConnectionremoveConnectionChangeListener in interface IRemoteConnectionpublic void fireConnectionChangeEvent(int type)
IRemoteConnectionRemoteConnectionChangeEvent for a list of event
types.fireConnectionChangeEvent in interface IRemoteConnectionpublic java.lang.String toString()
toString in class java.lang.Object