Package aQute.bnd.remoteworkspace.client
Class RemoteWorkspaceClientFactory
java.lang.Object
aQute.bnd.remoteworkspace.client.RemoteWorkspaceClientFactory
A class that can setup a 2-way link to a
RemoteWorkspace
on the same
machine.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RemoteWorkspace
create
(int port, RemoteWorkspaceClient client) Create a Remote Workspace on a specific port.static RemoteWorkspace
create
(File dir, RemoteWorkspaceClient client) Create a Remote Workspace object that communicates with a Remote Workspace server on the same machine on the loopback interface.static File
getPortDirectory
(File dir, File org) Get the directory where the ports are registered in
-
Constructor Details
-
RemoteWorkspaceClientFactory
public RemoteWorkspaceClientFactory()
-
-
Method Details
-
create
Create a Remote Workspace object that communicates with a Remote Workspace server on the same machine on the loopback interface.This class will search in the
{dir}/cnf/cache/remotews
directory for registered workspaces. (Multiple can be registered.) It will try to contact these remote workspace servers in order of last modified, newest first. The first one that responds will be returned.- Parameters:
dir
- The directory of the workspaceclient
- the client API- Returns:
- a RemoteWorkspace
-
create
Create a Remote Workspace on a specific port.- Parameters:
port
- the port to useclient
- the client API- Returns:
- a Workspace
- Throws:
IOException
- when something goes wrong
-
getPortDirectory
Get the directory where the ports are registered in- Parameters:
dir
- the directory to start from.org
- the original directory started from- Returns:
- the directory (cnf/cache/remotews) in the first workspace encountered
-