javax.slee.facilities
Interface ActivityContextNamingFacility


public interface ActivityContextNamingFacility

The Activity Context Naming Facility provides a global flat namespace for naming Activity Contexts. It allows an SBB entity to bind a name to an Activity Context, and other SBB entities to lookup the Activity Context by this name. An Activity Context can be bound to zero or more names.

This facility is transactional in nature. Naming operations only take effect once the enclosing transaction commits.

SBB JNDI Location:
java:comp/env/slee/facilities/activitycontextnaming


Method Summary
 void bind(ActivityContextInterface aci, java.lang.String name)
          Bind an Activity Context to a name.
 ActivityContextInterface lookup(java.lang.String name)
          Get a reference to the Activity Context bound to a particular name.
 void unbind(java.lang.String name)
          Unbind a bound name.
 

Method Detail

bind

public void bind(ActivityContextInterface aci,
                 java.lang.String name)
          throws java.lang.NullPointerException,
                 java.lang.IllegalArgumentException,
                 TransactionRequiredLocalException,
                 NameAlreadyBoundException,
                 FacilityException
Bind an Activity Context to a name.

This method is a mandatory transactional method.

Parameters:
aci - an ActivityContextInterface object that encapsulates the Activity Context to bind.
name - the name to bind the Activity Context to.
Throws:
java.lang.NullPointerException - if any argument is null.
java.lang.IllegalArgumentException - if name is zero-length.
TransactionRequiredLocalException - if this method is invoked without a valid transaction context.
NameAlreadyBoundException - if the specified name is already bound to some Activity Context.
FacilityException - if the activity context could not be bound due to a system-level failure.

unbind

public void unbind(java.lang.String name)
            throws java.lang.NullPointerException,
                   TransactionRequiredLocalException,
                   NameNotBoundException,
                   FacilityException
Unbind a bound name.

This method is a mandatory transactional method.

Parameters:
name - the name that should be unbound.
Throws:
java.lang.NullPointerException - if name is null.
TransactionRequiredLocalException - if this method is invoked without a valid transaction context.
NameNotBoundException - if the specified name is not currently bound to an Activity Context.
FacilityException - if the name could not be unbound due to a system-level failure.

lookup

public ActivityContextInterface lookup(java.lang.String name)
                                throws java.lang.NullPointerException,
                                       TransactionRequiredLocalException,
                                       FacilityException
Get a reference to the Activity Context bound to a particular name.

This method is a mandatory transactional method.

Parameters:
name - the name the Activity Context is bound to.
Returns:
an ActivityContextInterface object that encapsulates the Activity Context bound to the specified name. If no Activity Context is bound to the name, this method returns null.
Throws:
java.lang.NullPointerException - if name is null.
TransactionRequiredLocalException - if this method is invoked without a valid transaction context.
FacilityException - if the lookup failed due to a system-level failure.