public class OpenBISAddonImpl extends java.rmi.server.UnicastRemoteObject implements OpenBISAddon, java.lang.Runnable
Constructor and Description |
---|
OpenBISAddonImpl()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addTransferListener(OpenBISListener listener)
Adds a listener which gets informed about the current state of the transfer.
|
void |
cancelTransfer()
Tries to interrupt a running transfer of data.
|
java.lang.String |
getAddonDescription()
Should return a human readable description of the general purpose of the interface, about the provided
functionality, specific properties of the implementation, as well as about the person/company which designed the addon and how where it can be obtained
(e.g.
|
java.lang.String |
getAddonID()
Should return a unique ID of the specific implementation of this interface.
|
java.lang.String |
getAddonName()
Should return a short, human readable name for the addon.
|
float |
getAddonVersion()
Should return the version of the addon.
|
boolean |
isTransferring()
Returns true if there is a currently active transfer taking place, and false otherwise.
|
void |
removeTransferListener(OpenBISListener listener)
Removes a previously added listener.
|
void |
run()
Does updata the state of this addon based on the progress of rsync.
|
void |
transferMeasurement(java.lang.String sshUser,
java.lang.String sshServer,
java.lang.String sshDirectory,
java.lang.String openBISUser,
java.lang.String projectIdentifier,
java.lang.String measurementIdentifier,
java.lang.String measurementFolder,
boolean overwrite)
Transfers a measurement to OpenBIS and saves it there under openBISUser/projectIdentifier/measurementIdentifier.
|
clone, exportObject, exportObject, exportObject, unexportObject
public OpenBISAddonImpl() throws java.rmi.RemoteException
java.rmi.RemoteException
public java.lang.String getAddonName() throws java.rmi.RemoteException
ServerAddon
getAddonName
in interface ServerAddon
java.rmi.RemoteException
public float getAddonVersion() throws java.rmi.RemoteException
ServerAddon
getAddonVersion
in interface ServerAddon
java.rmi.RemoteException
public java.lang.String getAddonDescription() throws java.rmi.RemoteException
ServerAddon
getAddonDescription
in interface ServerAddon
java.rmi.RemoteException
public java.lang.String getAddonID() throws java.rmi.RemoteException
ServerAddon
getAddonID
in interface ServerAddon
java.rmi.RemoteException
public void transferMeasurement(java.lang.String sshUser, java.lang.String sshServer, java.lang.String sshDirectory, java.lang.String openBISUser, java.lang.String projectIdentifier, java.lang.String measurementIdentifier, java.lang.String measurementFolder, boolean overwrite) throws java.rmi.RemoteException, OpenBISException
OpenBISAddon
transferMeasurement
in interface OpenBISAddon
sshUser
- The user name for the SSH connection.sshServer
- The SSH server name (i.e.: the OpenBIS server).sshDirectory
- The directory configured as the drop box on the OpenBIS server, e.g. "~/servers/datastore_server/data/microscope". This folder must be the same as configured in OpenBIS for incoming microscopy files.openBISUser
- Identifier of the OpenBIS user. The user name has to be already configured using the OpenBIS UI. Usually different then the SSH user name.projectIdentifier
- Identifier of the project the measurement belongs to. The project identifier has to be already configured under the user name using the OpenBIS UI.measurementIdentifier
- An identifier for the measurement. The measurement does NOT have to be configured before.measurementFolder
- The folder on the YouScope server where the measurement data is saved.overwrite
- True if an existing measurement in OpenBIS should be overwritten, false if not.java.rmi.RemoteException
OpenBISException
- Thrown if transfer could not be initialized.public void addTransferListener(OpenBISListener listener) throws java.rmi.RemoteException
OpenBISAddon
addTransferListener
in interface OpenBISAddon
listener
- Listener to add.java.rmi.RemoteException
public void removeTransferListener(OpenBISListener listener) throws java.rmi.RemoteException
OpenBISAddon
removeTransferListener
in interface OpenBISAddon
listener
- Listener to remove.java.rmi.RemoteException
public void run()
run
in interface java.lang.Runnable
public void cancelTransfer() throws java.rmi.RemoteException
OpenBISAddon
cancelTransfer
in interface OpenBISAddon
java.rmi.RemoteException
public boolean isTransferring() throws java.rmi.RemoteException
OpenBISAddon
isTransferring
in interface OpenBISAddon
java.rmi.RemoteException