Class RemoteWorkspaceServer
java.lang.Object
aQute.bnd.remoteworkspace.server.RemoteWorkspaceServer
- All Implemented Interfaces:
Closeable, AutoCloseable
Implements an RPC interface to a workspace. When a workspace is created then
it can create a Remote Workspace Server to allow remote access.
This server will register the ephemeral port it uses in the
cnf/cache/remotews directory so that it can be found by clients. This
registration is deleted when the process properly exits.
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteWorkspaceServer(Workspace workspace) Create a new Remote Workspace Server. -
Method Summary
-
Constructor Details
-
RemoteWorkspaceServer
Create a new Remote Workspace Server. This will create a server socket on a random port. The protocole over this socket is defined by theRemoteWorkspaceinterface. The port number will be registered incnf/cache/remotews/<portnr>. That is, it is possible to have multiple workspaces open on the system workspace. (Locking between workspaces is not handled though.)- Parameters:
workspace- the given workspace- Throws:
UnknownHostExceptionIOException
-
-
Method Details
-
close
Close the server. This generally happens when the corresponding workspace is closed. It will release the ephemeral port and delete the registration file.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-