LocalServer

public class LocalServer extends Server<LocalMethod>

Objects of this class associate a collection of method objects which are implemented by callback functions with a scope under which these methods are exposed for remote clients.

Author

jmoringe

Constructors

LocalServer

public LocalServer(LocalServerCreateArgs args)

Create a new LocalServer object that exposes its methods under the provided scope.

Parameters

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.

Methods

addMethod

public void addMethod(String name, Callback callback)

Adds a new method to the server which can be called via RemoteServer instances.

Parameters
  • name – name of the method

  • callback – callback implementing the functionality of the method

Throws

getDataType

public Class<?> getDataType()

getKind

public String getKind()

waitForShutdown

public void waitForShutdown()

After calling deactivate() this methods waits until the server terminated completely.

Throws

InterruptedException – interrupted while waiting for the shutdown