org.opends.server.core
Class NetworkGroup

java.lang.Object
  extended by org.opends.server.core.NetworkGroup

public class NetworkGroup
extends java.lang.Object

This class defines the network group. A network group is used to categorize client connections. A network group is defined by a set of criteria, a set of policies and a set of workflow nodes. A client connection belongs to a network group whenever it satisfies all the network group criteria. As soon as a client connection belongs to a network group, it has to comply with all the network group policies. Any cleared client operation can be routed to one the network group workflow nodes.


Constructor Summary
NetworkGroup(java.lang.String networkGroupID)
          Creates a new instance of the network group.
 
Method Summary
 void deregister()
          Deregisters the current network group (this) with the server.
static void deregisterAllOnShutdown()
          Deregisters all network groups that have been registered.
 Workflow deregisterWorkflow(DN baseDN)
          Deregisters a workflow with the network group.
 void deregisterWorkflow(java.lang.String workflowID)
          Deregisters a workflow with the network group.
 void finalizeNetworkGroup()
          Performs any finalization that might be required when this network group is unloaded.
static NetworkGroup getDefaultNetworkGroup()
          Returns the default network group.
 NetworkGroupNamingContexts getNamingContexts()
          Returns the list of naming contexts handled by the network group.
static java.util.Collection<NetworkGroup> getRegisteredNetworkGroups()
          Provides the list of network group registered with the server.
 Workflow getWorkflowCandidate(DN baseDN)
          Gets the highest workflow in the topology that can handle the baseDN.
 void register()
          Registers the current network group (this) with the server.
 void registerWorkflow(WorkflowImpl workflow)
          Registers a workflow with the network group.
 void reset()
          Resets the configuration of the current network group.
static void resetConfig()
          Resets the configuration of all the registered network groups.
 java.lang.StringBuilder toString(java.lang.String leftMargin)
          Dumps info from the current network group for debug purpose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkGroup

public NetworkGroup(java.lang.String networkGroupID)
Creates a new instance of the network group.

Parameters:
networkGroupID - the network group internal identifier
Method Detail

finalizeNetworkGroup

public void finalizeNetworkGroup()
Performs any finalization that might be required when this network group is unloaded. No action is taken in the default implementation.


register

public void register()
              throws DirectoryException
Registers the current network group (this) with the server.

Throws:
DirectoryException - If the network group ID for the provided network group conflicts with the network group ID of an existing network group.

deregister

public void deregister()
Deregisters the current network group (this) with the server.


registerWorkflow

public void registerWorkflow(WorkflowImpl workflow)
                      throws DirectoryException
Registers a workflow with the network group.

Parameters:
workflow - the workflow to register
Throws:
DirectoryException - If the workflow ID for the provided workflow conflicts with the workflow ID of an existing workflow.

deregisterWorkflow

public Workflow deregisterWorkflow(DN baseDN)
Deregisters a workflow with the network group. The workflow to deregister is identified by its baseDN.

Parameters:
baseDN - the baseDN of the workflow to deregister, may be null
Returns:
the deregistered workflow

deregisterWorkflow

public void deregisterWorkflow(java.lang.String workflowID)
Deregisters a workflow with the network group. The workflow to deregister is identified by its workflow ID.

Parameters:
workflowID - the workflow identifier of the workflow to deregister

getWorkflowCandidate

public Workflow getWorkflowCandidate(DN baseDN)
Gets the highest workflow in the topology that can handle the baseDN.

Parameters:
baseDN - the base DN of the request
Returns:
the highest workflow in the topology that can handle the base DN, null if none was found

getDefaultNetworkGroup

public static NetworkGroup getDefaultNetworkGroup()
Returns the default network group. The default network group is always defined and has no criterion, no policy and provide full access to all the registered workflows.

Returns:
the default network group

getNamingContexts

public NetworkGroupNamingContexts getNamingContexts()
Returns the list of naming contexts handled by the network group.

Returns:
the list of naming contexts

toString

public java.lang.StringBuilder toString(java.lang.String leftMargin)
Dumps info from the current network group for debug purpose.

Parameters:
leftMargin - white spaces used to indent traces
Returns:
a string buffer that contains trace information

deregisterAllOnShutdown

public static void deregisterAllOnShutdown()
Deregisters all network groups that have been registered. This should be called when the server is shutting down.


getRegisteredNetworkGroups

public static java.util.Collection<NetworkGroup> getRegisteredNetworkGroups()
Provides the list of network group registered with the server.

Returns:
the list of registered network groups

resetConfig

public static void resetConfig()
Resets the configuration of all the registered network groups.


reset

public void reset()
Resets the configuration of the current network group.