public abstract class PetalsRegistryClientFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_NAME
Name of the property used to select the implementation of Petals Registry Client API.
|
Constructor and Description |
---|
PetalsRegistryClientFactory() |
Modifier and Type | Method and Description |
---|---|
abstract PetalsRegistryClient |
createClient(String host,
Integer port,
String group,
String password)
Create a new Petals Registry client connected to the remote Petals Registry cluster.
|
static PetalsRegistryClientFactory |
newInstance()
Create a new instance of Petals Registry Client API using an implementation defined according to the following
rule:
first, if the property is set, its value is used to look for the service
implementation,
otherwise the service implementation is looking for in the current classloader.
|
public static final String PROPERTY_NAME
public static final PetalsRegistryClientFactory newInstance() throws DuplicatedServiceException, MissingServiceException
Create a new instance of Petals Registry Client API using an implementation defined according to the following rule:
DuplicatedServiceException
- The service to look for is duplicated.MissingServiceException
- Unable to find the service.public abstract PetalsRegistryClient createClient(String host, Integer port, String group, String password) throws ConnectionErrorException
host
- A hostname where the remote Petals Registry cluster runs. If set to null
, the host name
is localhost
.port
- The port of the remote Petals Registry cluster. If set to null
, the default port
PetalsRegistryClient#DEFAULT_PORT
is used.group
- Group name of the credentials required to establish a connection to the remote Petals Registry
cluster. If set to null
, the default value is used:
.password
- Password of the credentials required to establish a connection to the remote Petals Registry cluster.
If set to null
, the default value is used:
.AuthenticationException
- When credentials are rejected by the Petals Registry clusterConnectionErrorException
- An error occurs establishing the connection to the Petals Registry clusterCopyright © 2005-2015 Linagora. All Rights Reserved.