Factory¶
-
public final class
Factory
¶ A factory for RSB client-level objects. This class is a Singleton. It implements an observer pattern to notify about the creation and destruction of participants.
- Author
jwienke, swrede
Methods¶
addObserver¶
-
public void
addObserver
(ParticipantObserver observer)¶ Adds an observer to be notified on participant changes.
- Parameters
observer – the observer to add, not
null
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(Scope scope, Class<?> type)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
type – type identifier of the informer
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(String scope, Class<?> type)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
type – type identifier of the informer
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(Scope scope, Class<?> type, ParticipantConfig config)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
type – type identifier of the informer
config – participant config to use
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(String scope, Class<?> type, ParticipantConfig config)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
type – type identifier of the informer
config – participant config to use
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(Scope scope)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(String scope)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(Scope scope, ParticipantConfig config)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
config – participant config to use
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(String scope, ParticipantConfig config)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
scope – scope of the informer
config – participant config to use
- Throws
InitializeException – error initializing the informer
- Returns
new informer instance
createInformer¶
-
public <DataType> Informer<DataType>
createInformer
(InformerCreateArgs args)¶ Creates a new informer instance.
- Parameters
<DataType> – type of the data sent by this informer
args – Parameter object with create arguments for participant.
- Throws
InitializeException – error initializing the informer
IllegalArgumentException – args is
null
- Returns
new informer
createListener¶
-
public Listener
createListener
(Scope scope)¶ Creates a new listener instance.
- Parameters
scope – scope of the listener
- Throws
InitializeException – error initializing the listener
- Returns
new listener
createListener¶
-
public Listener
createListener
(String scope)¶ Creates a new listener instance.
- Parameters
scope – scope of the listener
- Throws
InitializeException – error initializing the listener
- Returns
new listener
createListener¶
-
public Listener
createListener
(String scope, ParticipantConfig config)¶ Creates a new listener instance.
- Parameters
scope – scope of the listener
config – participant configuration to use
- Throws
InitializeException – error initializing the listener
- Returns
new listener
createListener¶
-
public Listener
createListener
(Scope scope, ParticipantConfig config)¶ Creates a new listener instance.
- Parameters
scope – scope of the listener
config – participant configuration to use
- Throws
InitializeException – error initializing the listener
- Returns
new listener
createListener¶
-
public Listener
createListener
(ListenerCreateArgs args)¶ Creates a new listener instance.
- Parameters
args – Parameter object with create arguments for participant.
- Throws
InitializeException – error initializing the listener
IllegalArgumentException – args is
null
- Returns
new listener
createLocalServer¶
-
public LocalServer
createLocalServer
(Scope scope)¶ Creates a new LocalServer object which exposes methods under the scope @a scope.
- Parameters
scope – The scope under which methods of the LocalServer object should be exposed.
- Returns
The new LocalServer object.
createLocalServer¶
-
public LocalServer
createLocalServer
(Scope scope, ParticipantConfig config)¶ Creates a new LocalServer object which exposes methods under the scope @a scope.
- Parameters
scope – The scope under which methods of the LocalServer object should be exposed.
config – participant configuration to use
- Returns
The new LocalServer object.
createLocalServer¶
-
public LocalServer
createLocalServer
(String scope, ParticipantConfig config)¶ Creates a new LocalServer object which exposes methods under the scope @a scope.
- Parameters
scope – The scope under which methods of the LocalServer object should be exposed.
config – participant configuration to use
- Returns
The new LocalServer object.
createLocalServer¶
-
public LocalServer
createLocalServer
(String scope)¶ Creates a new LocalServer object which exposes methods under the scope @a scope.
- Parameters
scope – The scope under which methods of the LocalServer object should be exposed.
- Returns
The new LocalServer object.
createLocalServer¶
-
public LocalServer
createLocalServer
(LocalServerCreateArgs args)¶ Creates a new LocalServer instance.
- Parameters
args – Parameter object with create arguments for participant.
- Throws
IllegalArgumentException – args is
null
- Returns
new LocalServer
createReader¶
-
public Reader
createReader
(Scope scope)¶ Creates a new reader instance.
- Parameters
scope – scope of the reader
- Throws
InitializeException – error initializing the reader
- Returns
new reader
createReader¶
-
public Reader
createReader
(String scope)¶ Creates a new reader instance.
- Parameters
scope – scope of the reader
- Throws
InitializeException – error initializing the reader
- Returns
new reader
createReader¶
-
public Reader
createReader
(String scope, ParticipantConfig config)¶ Creates a new reader instance.
- Parameters
scope – scope of the reader
config – participant configuration to use
- Throws
InitializeException – error initializing the reader
- Returns
new reader
createReader¶
-
public Reader
createReader
(Scope scope, ParticipantConfig config)¶ Creates a new reader instance.
- Parameters
scope – scope of the reader
config – participant configuration to use
- Throws
InitializeException – error initializing the reader
- Returns
new reader
createReader¶
-
public Reader
createReader
(ReaderCreateArgs args)¶ Creates a new reader instance.
- Parameters
args – Parameter object with create arguments for the participant.
- Throws
InitializeException – error initializing the reader
IllegalArgumentException – args is
null
- Returns
new reader
createRemoteServer¶
-
public 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.
- Parameters
scope – The scope under which a remote server provides its methods.
- Returns
The new RemoteServer object.
createRemoteServer¶
-
public 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.
- Parameters
scope – The scope under which a remote server provides its methods.
- Returns
The new RemoteServer object.
createRemoteServer¶
-
public 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.
- Parameters
scope – The scope under which a remote server provides its methods.
config – participant configuration to use
- Returns
The new RemoteServer object.
createRemoteServer¶
-
public 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.
- Parameters
scope – The scope under which a remote server provides its methods.
config – participant configuration to use
- Returns
The new RemoteServer object.
createRemoteServer¶
-
public 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.
- Parameters
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.
- Returns
The new RemoteServer object.
createRemoteServer¶
-
public 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.
- Parameters
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.
- Returns
The new RemoteServer object.
createRemoteServer¶
-
public RemoteServer
createRemoteServer
(RemoteServerCreateArgs args)¶ Creates a new remote server instance.
- Parameters
args – Parameter object with create arguments for participant.
- Throws
IllegalArgumentException – args is
null
- Returns
new remote server
getDefaultParticipantConfig¶
-
public ParticipantConfig
getDefaultParticipantConfig
()¶ Returns the participant config used per default for new participants. This instance might be modified but changes are only applied to newly created participants.
- Returns
default participant config
getInstance¶
getProperties¶
-
public Properties
getProperties
()¶ Returns the default configuration properties.
- Returns
property instances
removeObserver¶
-
public void
removeObserver
(ParticipantObserver observer)¶ Removes an observer in case it existed. Otherwise it does nothing.
- Parameters
observer – the observer to remove
setDefaultParticipantConfig¶
-
public void
setDefaultParticipantConfig
(ParticipantConfig config)¶ Sets the default participant config used per default for new participants. This method is not thread-safe! Only use it when no other thread is creating participants!
- Parameters
config – the new config to use, not
null
- Throws
IllegalArgumentException – if the given config is
null