Package aQute.bnd.remoteworkspace.client
Class RemoteWorkspaceClientFactory
- java.lang.Object
-
- aQute.bnd.remoteworkspace.client.RemoteWorkspaceClientFactory
-
public class RemoteWorkspaceClientFactory extends java.lang.Object
A class that can setup a 2-way link to aRemoteWorkspace
on the same machine.
-
-
Constructor Summary
Constructors Constructor Description RemoteWorkspaceClientFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RemoteWorkspace
create(int port, RemoteWorkspaceClient client)
Create a Remote Workspace on a specific port.static RemoteWorkspace
create(java.io.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 java.io.File
getPortDirectory(java.io.File dir, java.io.File org)
Get the directory where the ports are registered in
-
-
-
Method Detail
-
create
public static RemoteWorkspace create(java.io.File dir, RemoteWorkspaceClient client)
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
public static RemoteWorkspace create(int port, RemoteWorkspaceClient client) throws java.io.IOException
Create a Remote Workspace on a specific port.- Parameters:
port
- the port to useclient
- the client API- Returns:
- a Workspace
- Throws:
java.io.IOException
- when something goes wrong
-
getPortDirectory
public static java.io.File getPortDirectory(java.io.File dir, java.io.File org)
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
-
-