public final class Factory extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Factory.ParticipantObserverManager
A utility class to manage registered
ParticipantObserver
instances. |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(ParticipantObserver observer)
Adds an observer to be notified on participant changes.
|
<DataType> Informer<DataType> |
createInformer(InformerCreateArgs args)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(Scope scope)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(Scope scope,
Class<?> type)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(Scope scope,
Class<?> type,
ParticipantConfig config)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(Scope scope,
ParticipantConfig config)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(String scope)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(String scope,
Class<?> type)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(String scope,
Class<?> type,
ParticipantConfig config)
Creates a new informer instance.
|
<DataType> Informer<DataType> |
createInformer(String scope,
ParticipantConfig config)
Creates a new informer instance.
|
Listener |
createListener(ListenerCreateArgs args)
Creates a new listener instance.
|
Listener |
createListener(Scope scope)
Creates a new listener instance.
|
Listener |
createListener(Scope scope,
ParticipantConfig config)
Creates a new listener instance.
|
Listener |
createListener(String scope)
Creates a new listener instance.
|
Listener |
createListener(String scope,
ParticipantConfig config)
Creates a new listener instance.
|
LocalServer |
createLocalServer(LocalServerCreateArgs args)
Creates a new LocalServer instance.
|
LocalServer |
createLocalServer(Scope scope)
Creates a new LocalServer object which exposes methods under the scope @a
scope.
|
LocalServer |
createLocalServer(Scope scope,
ParticipantConfig config)
Creates a new LocalServer object which exposes methods under the scope @a
scope.
|
LocalServer |
createLocalServer(String scope)
Creates a new LocalServer object which exposes methods under the scope @a
scope.
|
LocalServer |
createLocalServer(String scope,
ParticipantConfig config)
Creates a new LocalServer object which exposes methods under the scope @a
scope.
|
RemoteServer |
createRemoteServer(RemoteServerCreateArgs args)
Creates a new remote server instance.
|
RemoteServer |
createRemoteServer(Scope scope)
Creates a new RemoteServer object which is suitable for calling methods
provided by a remote server under the scope @a scope.
|
RemoteServer |
createRemoteServer(Scope scope,
double timeout)
Creates a new RemoteServer object which is suitable for calling methods
provided by a remote server under the scope @a scope.
|
RemoteServer |
createRemoteServer(Scope scope,
ParticipantConfig config)
Creates a new RemoteServer object which is suitable for calling methods
provided by a remote server under the scope @a scope.
|
RemoteServer |
createRemoteServer(String scope)
Creates a new RemoteServer object which is suitable for calling methods
provided by a remote server under the scope @a scope.
|
RemoteServer |
createRemoteServer(String scope,
double timeout)
Creates a new RemoteServer object which is suitable for calling methods
provided by a remote server under the scope @a scope.
|
RemoteServer |
createRemoteServer(String scope,
ParticipantConfig config)
Creates a new RemoteServer object which is suitable for calling methods
provided by a remote server under the scope @a scope.
|
ParticipantConfig |
getDefaulParticipantconfig()
Deprecated.
use
getDefaultParticipantConfig() (without typo in
name) |
ParticipantConfig |
getDefaultParticipantConfig()
Returns the participant config used per default for new participants.
|
static Factory |
getInstance()
Returns the one and only instance of this class.
|
Properties |
getProperties()
Returns the default configuration properties.
|
void |
removeObserver(ParticipantObserver observer)
Removes an observer in case it existed.
|
void |
setDefaultParticipantConfig(ParticipantConfig config)
Sets the default participant config used per default for new
participants.
|
public static Factory getInstance()
public <DataType> Informer<DataType> createInformer(Scope scope, Class<?> type) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informertype
- type identifier of the informerInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(String scope, Class<?> type) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informertype
- type identifier of the informerInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(Scope scope, Class<?> type, ParticipantConfig config) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informertype
- type identifier of the informerconfig
- participant config to useInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(String scope, Class<?> type, ParticipantConfig config) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informertype
- type identifier of the informerconfig
- participant config to useInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(Scope scope) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informerInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(String scope) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informerInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(Scope scope, ParticipantConfig config) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informerconfig
- participant config to useInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(String scope, ParticipantConfig config) throws InitializeException
DataType
- type of the data sent by this informerscope
- scope of the informerconfig
- participant config to useInitializeException
- error initializing the informerpublic <DataType> Informer<DataType> createInformer(InformerCreateArgs args) throws InitializeException
DataType
- type of the data sent by this informerargs
- Parameter object with create arguments for participant.InitializeException
- error initializing the informerIllegalArgumentException
- args is null
public Listener createListener(Scope scope) throws InitializeException
scope
- scope of the listenerInitializeException
- error initializing the listenerpublic Listener createListener(String scope) throws InitializeException
scope
- scope of the listenerInitializeException
- error initializing the listenerpublic Listener createListener(String scope, ParticipantConfig config) throws InitializeException
scope
- scope of the listenerconfig
- participant configuration to useInitializeException
- error initializing the listenerpublic Listener createListener(Scope scope, ParticipantConfig config) throws InitializeException
scope
- scope of the listenerconfig
- participant configuration to useInitializeException
- error initializing the listenerpublic Listener createListener(ListenerCreateArgs args) throws InitializeException
args
- Parameter object with create arguments for participant.InitializeException
- error initializing the listenerIllegalArgumentException
- args is null
public LocalServer createLocalServer(Scope scope)
scope
- The scope under which methods of the LocalServer object should
be exposed.public LocalServer createLocalServer(Scope scope, ParticipantConfig config)
scope
- The scope under which methods of the LocalServer object should
be exposed.config
- participant configuration to usepublic LocalServer createLocalServer(String scope, ParticipantConfig config)
scope
- The scope under which methods of the LocalServer object should
be exposed.config
- participant configuration to usepublic LocalServer createLocalServer(String scope)
scope
- The scope under which methods of the LocalServer object should
be exposed.public LocalServer createLocalServer(LocalServerCreateArgs args)
args
- Parameter object with create arguments for participant.IllegalArgumentException
- args is null
public RemoteServer createRemoteServer(Scope scope)
scope
- The scope under which a remote server provides its methods.public RemoteServer createRemoteServer(String scope)
scope
- The scope under which a remote server provides its methods.public RemoteServer createRemoteServer(Scope scope, ParticipantConfig config)
scope
- The scope under which a remote server provides its methods.config
- participant configuration to usepublic RemoteServer createRemoteServer(String scope, ParticipantConfig config)
scope
- The scope under which a remote server provides its methods.config
- participant configuration to usepublic RemoteServer createRemoteServer(Scope scope, double timeout)
scope
- The scope under which a remote server provides its methods.timeout
- The amount of seconds methods calls should wait for their
replies to arrive before failing.public RemoteServer createRemoteServer(String scope, double timeout)
scope
- The scope under which a remote server provides its methods.timeout
- The amount of seconds methods calls should wait for their
replies to arrive before failing.public RemoteServer createRemoteServer(RemoteServerCreateArgs args)
args
- Parameter object with create arguments for participant.IllegalArgumentException
- args is null
public Properties getProperties()
public ParticipantConfig getDefaultParticipantConfig()
public void setDefaultParticipantConfig(ParticipantConfig config)
config
- the new config to use, not null
IllegalArgumentException
- if the given config is null
@Deprecated public ParticipantConfig getDefaulParticipantconfig()
getDefaultParticipantConfig()
(without typo in
name)public void addObserver(ParticipantObserver observer)
observer
- the observer to add, not null
public void removeObserver(ParticipantObserver observer)
observer
- the observer to removeCopyright © 2018 CoR-Lab. All rights reserved.