|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.root1.simon.Registry
public final class Registry
The SIMON server acts as a registry for remote objects. So, Registry is SIMON's internal server implementation
Constructor Summary | |
---|---|
protected |
Registry(java.net.InetAddress address,
int port,
java.util.concurrent.ExecutorService threadPool,
java.lang.String protocolFactoryClassName)
Creates a registry |
protected |
Registry(java.net.InetAddress address,
int port,
java.util.concurrent.ExecutorService threadPool,
java.lang.String protocolFactoryClassName,
SslContextFactory sslContextFactory)
Creates a SSL powered registry |
Method Summary | |
---|---|
void |
bind(java.lang.String name,
java.lang.Object remoteObject)
Binds a remote object to the registry's own LookupTable |
void |
bindAndPublish(java.lang.String name,
java.lang.Object remoteObject)
Binds the object to the Registry and publishes it to the network,
so that they can be found with Simon.searchRemoteObjects(int) or
Simon.searchRemoteObjects(SearchProgressListener, int) |
protected Dispatcher |
getDispatcher()
Returns the Dispatcher associated with this registry. |
int |
getKeepAliveInterval()
Gets the keep alive interval time in seconds of this registry. |
int |
getKeepAliveTimeout()
Gets the keep alive timeout time in seconds of this registry. |
SimonRegistryStatistics |
getStatistics()
Returns a object that lets you get some network related information on the session of the given remote object (an instance of SimonProxy |
boolean |
isRunning()
Returns whether the registry is running and active or not |
void |
rebind(java.lang.String name,
java.lang.Object remoteObject)
As the name says, it re-binds a remote object. |
void |
setKeepAliveInterval(int seconds)
Sets the keep alive interval time in seconds for this registry |
void |
setKeepAliveTimeout(int seconds)
Sets the keep alive timeout time in seconds for this registry. |
void |
stop()
Stops the registry. |
boolean |
unbind(java.lang.String name)
Unbinds a remote object from the registry's own LookupTable . |
boolean |
unpublish(java.lang.String name)
Unpublish a already published remote object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Registry(java.net.InetAddress address, int port, java.util.concurrent.ExecutorService threadPool, java.lang.String protocolFactoryClassName) throws java.io.IOException
address
- the interface address on which the socketserver listens onport
- the port on which the socketserver listens onthreadPool
- the thread pool implementation which is forwarded to the dispatcherprotocolFactoryClassName
- the full classname of the class that describes to network protocol
java.io.IOException
- if there are problems with creating the mina socketserverprotected Registry(java.net.InetAddress address, int port, java.util.concurrent.ExecutorService threadPool, java.lang.String protocolFactoryClassName, SslContextFactory sslContextFactory) throws java.io.IOException
address
- the interface address on which the socketserver listens onport
- the port on which the socketserver listens onthreadPool
- the thread pool implementation which is forwarded to the dispatcherprotocolFactoryClassName
- the full classname of the class that describes to network protocolsslContextFactory
- the factory which is used to get the server ssl context
java.io.IOException
- if there are problems with creating the mina socketserverMethod Detail |
---|
public void setKeepAliveTimeout(int seconds)
seconds
- time in secondspublic void setKeepAliveInterval(int seconds)
seconds
- time in secondspublic int getKeepAliveTimeout()
public int getKeepAliveInterval()
public void stop()
LookupTable
in the dispatcher, stops the
acceptor and the Dispatcher
. After running this method, no
further connection/communication is possible with this registry.
public void bind(java.lang.String name, java.lang.Object remoteObject) throws NameBindingException
LookupTable
name
- a name for object to bindremoteObject
- the object to bind
NameBindingException
- if there are problems binding the remoteobject to the
registrypublic void bindAndPublish(java.lang.String name, java.lang.Object remoteObject) throws NameBindingException
Registry
and publishes it to the network,
so that they can be found with Simon.searchRemoteObjects(int)
or
Simon.searchRemoteObjects(SearchProgressListener, int)
name
- a name for the object to bind and publishremoteObject
- the object to bind and publish
NameBindingException
- if binding failspublic boolean unbind(java.lang.String name)
LookupTable
. If
it's published, it's removed from the list of published objects
name
- the object to unbind (and unpublish, if published)
public boolean unpublish(java.lang.String name)
name
- the object to unpublish, if published
public void rebind(java.lang.String name, java.lang.Object remoteObject)
unbind(name);
bind(name, remoteObject);
name
- the name of the object to rebindremoteObject
- the object to rebindpublic boolean isRunning()
public SimonRegistryStatistics getStatistics()
SimonProxy
SimonRegistryStatistics
that gives
access to the statistics data of this Registry
protected Dispatcher getDispatcher()
Dispatcher
associated with this registry.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |