public class LocalServer extends Server<rsb.patterns.LocalMethod>
Constructor and Description |
---|
LocalServer(LocalServerCreateArgs args)
Create a new LocalServer object that exposes its methods under the
provided scope.
|
Modifier and Type | Method and Description |
---|---|
void |
addMethod(String name,
Callback callback)
Adds a new method to the server which can be called via
RemoteServer instances. |
Class<?> |
getDataType()
Returns the data type transfered by this participant.
|
String |
getKind()
Returns kind of participant in RSB terminology.
|
void |
waitForShutdown()
After calling
Server.deactivate() this methods waits until the server
terminated completely. |
activate, addMethod, deactivate, getMethod, getMethods, getTransportUris, hasMethod, isActive
getConfig, getId, getObserverManager, getScope, setObserverManager
public LocalServer(LocalServerCreateArgs args)
args
- Arguments used to create the local server. the scope specified
the common super-scope under which the methods of the newly
created server should be provided.public void addMethod(String name, Callback callback) throws RSBException
RemoteServer
instances.name
- name of the methodcallback
- callback implementing the functionality of the methodRSBException
- error initializing the methodIllegalArgumentException
- a method with the given name already exists.public void waitForShutdown() throws InterruptedException
Server.deactivate()
this methods waits until the server
terminated completely.InterruptedException
- interrupted while waiting for the shutdownpublic String getKind()
Participant
getKind
in class Participant
public Class<?> getDataType()
Participant
getDataType
in class Participant
null
if not applicable for this type of
participantCopyright © 2018 CoR-Lab. All rights reserved.