jgroup.core.registry
Interface RegistryService

All Superinterfaces:
Layer
All Known Implementing Classes:
RegistryLayer

public interface RegistryService
extends Layer

This interface is used by servers to bind and unbind their reference with a specified name from the dependable registry. That is the name to server reference bindings setup through this interface will be stored in the dependable registry. This interface is accessed by server objects (and layers) through the group manager.

Since:
Jgroup 2.2
Author:
Hein Meling

Nested Class Summary
 
Nested classes/interfaces inherited from interface jgroup.core.Layer
Layer.FinalizeLayer
 
Field Summary
static int DEFAULT_LEASE_TIME
          The default lease time used by the dependable registry (milliseconds) when clearing out expired leases.
 
Method Summary
 IID bind()
          Bind the server associated with the RegistryLayer to the object group associated with the name obtained from the application.xml file in the dependable registry running in the same distributed system as this group manager.
 IID bind(java.lang.Object server)
          Bind the given server to the object group associated with the name obtained from the application.xml file in the dependable registry running in the same distributed system as this group manager.
 IID bind(java.lang.String name, java.lang.Object server)
          Bind the given server to the object group associated with the name in the dependable registry running in the same distributed system as this group manager.
 IID bind(java.lang.String name, java.lang.Object server, DependableRegistry registry)
          Bind the given server to the object group associated with the specified name in the specified dependable registry.
 IID getIID()
          Returns the local invocation identifier bound to the dependable registry.
 void refreshLease()
          Refresh the lease for the local server.
 void unbind()
          Unbind the reference associated with the RegistryLayer from the dependable registry running in the same distributed system as this group manager.
 void unbind(IID bindId)
          Unbind the reference associated with the specified binding identifier from the dependable registry running in the same distributed system as this group manager.
 void unbind(IID bindId, DependableRegistry registry)
          Unbind the reference associated with the specified binding identifier from the specified dependable registry.
 
Methods inherited from interface jgroup.core.Layer
addListener
 

Field Detail

DEFAULT_LEASE_TIME

static final int DEFAULT_LEASE_TIME
The default lease time used by the dependable registry (milliseconds) when clearing out expired leases. This assumes that the LeaseLayer is configured in the application layer stack; otherwise lease expiration checks in the dependable registry is disabled. Changes to the lease time should be configured in the applications.xml configuration file.

See Also:
LeaseService.DEFAULT_REFRESH_RATE, Constant Field Values
Method Detail

bind

IID bind()
         throws java.rmi.RemoteException,
                JgroupException
Bind the server associated with the RegistryLayer to the object group associated with the name obtained from the application.xml file in the dependable registry running in the same distributed system as this group manager.

Returns:
A binding identifier IID that can be used to remove this server binding from the registry.
Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
java.rmi.AccessException - Raised when this operation is not permitted.
JgroupException - Raised in the event of a group communication failure.

bind

IID bind(java.lang.Object server)
         throws java.rmi.RemoteException,
                JgroupException
Bind the given server to the object group associated with the name obtained from the application.xml file in the dependable registry running in the same distributed system as this group manager.

Parameters:
server - The server in the object group to associated with the given name.
Returns:
A binding identifier IID that can be used to remove this server binding from the registry.
Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
java.rmi.AccessException - Raised when this operation is not permitted.
JgroupException - Raised in the event of a group communication failure.

bind

IID bind(java.lang.String name,
         java.lang.Object server)
         throws java.rmi.RemoteException,
                JgroupException
Bind the given server to the object group associated with the name in the dependable registry running in the same distributed system as this group manager.

Parameters:
name - The name associated with the object group.
server - The server in the object group to associated with the given name.
Returns:
A binding identifier IID that can be used to remove this server binding from the registry.
Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
java.rmi.AccessException - Raised when this operation is not permitted.
JgroupException - Raised in the event of a group communication failure.

bind

IID bind(java.lang.String name,
         java.lang.Object server,
         DependableRegistry registry)
         throws java.rmi.RemoteException,
                JgroupException
Bind the given server to the object group associated with the specified name in the specified dependable registry.

Parameters:
name - The name associated with the object group.
server - The server in the object group to associated with the given name.
registry - The dependable registry in which to bind the given server.
Returns:
A binding identifier IID that can be used to remove this server binding from the registry.
Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
java.rmi.AccessException - Raised when this operation is not permitted.
JgroupException - Raised in the event of a group communication failure.

unbind

void unbind()
            throws java.rmi.RemoteException,
                   java.rmi.NotBoundException,
                   JgroupException
Unbind the reference associated with the RegistryLayer from the dependable registry running in the same distributed system as this group manager.

Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
java.rmi.NotBoundException - Raised the given binding identifier was not in the dependable registry.
java.rmi.AccessException - Raised when this operation is not permitted.
JgroupException - Raised in the event of a group communication failure.

unbind

void unbind(IID bindId)
            throws java.rmi.RemoteException,
                   java.rmi.NotBoundException,
                   JgroupException
Unbind the reference associated with the specified binding identifier from the dependable registry running in the same distributed system as this group manager.

Parameters:
bindId - The binding identifier to be removed from the dependable registry.
Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
java.rmi.NotBoundException - Raised the given binding identifier was not in the dependable registry.
java.rmi.AccessException - Raised when this operation is not permitted.
JgroupException - Raised in the event of a group communication failure.

unbind

void unbind(IID bindId,
            DependableRegistry registry)
            throws java.rmi.RemoteException,
                   java.rmi.NotBoundException
Unbind the reference associated with the specified binding identifier from the specified dependable registry.

Parameters:
bindId - The binding identifier to be removed from the dependable registry.
registry - The dependable registry from which to unbind the given binding.
Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
java.rmi.NotBoundException - Raised the given binding identifier was not in the dependable registry.
java.rmi.AccessException - Raised when this operation is not permitted.
JgroupException - Raised in the event of a group communication failure.

refreshLease

void refreshLease()
                  throws java.rmi.RemoteException,
                         JgroupException
Refresh the lease for the local server.

Throws:
java.rmi.RemoteException - Raised when the remote operation failed.
JgroupException - Raised in the event of a group communication failure.

getIID

IID getIID()
           throws java.lang.NullPointerException
Returns the local invocation identifier bound to the dependable registry. This can be used to unbind() the associated server from the dependable registry.

Returns:
The local invocation identifier bound to the depedable registry.
Throws:
java.lang.NullPointerException - Raised if the replica is not yet bound to the dependable registry.


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.