com.ibm.cics.server
Class NameResource

java.lang.Object
  extended bycom.ibm.cics.server.API
      extended bycom.ibm.cics.server.SynchronizationResource
          extended bycom.ibm.cics.server.NameResource
All Implemented Interfaces:
java.io.Serializable

public class NameResource
extends SynchronizationResource
implements java.io.Serializable

This class provides the implementation for named synchronized resources.

See Also:
Serialized Form

Constructor Summary
NameResource()
          Construct a default NameResource.
 
Method Summary
 void dequeue()
          Unlock the named resource.
 void enqueue()
          Attempt to lock the named resource.
 java.lang.String getName()
          Return the name of the CICS resource.
 void setName(java.lang.String name)
          Sets the resource name corresponding to this object.
 void tryEnqueue()
          Attempt to lock the named resource without suspending.
 
Methods inherited from class com.ibm.cics.server.SynchronizationResource
getDescription, setDescription
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameResource

public NameResource()
Construct a default NameResource.

Method Detail

dequeue

public void dequeue()
             throws LengthErrorException
Unlock the named resource.

Throws:
LengthErrorException - the name of the resource is too long

enqueue

public void enqueue()
             throws ResourceUnavailableException,
                    LengthErrorException
Attempt to lock the named resource.

Throws:
ResourceUnavailableException - the resource is locked by another task
LengthErrorException - the name of the resource is too long

getName

public java.lang.String getName()
Return the name of the CICS resource.

Returns:
the resource name

setName

public void setName(java.lang.String name)
             throws java.lang.NullPointerException
Sets the resource name corresponding to this object.

Parameters:
name - the name of the CICS resource
Throws:
java.lang.NullPointerException

tryEnqueue

public void tryEnqueue()
                throws ResourceUnavailableException,
                       LengthErrorException
Attempt to lock the named resource without suspending.

Throws:
ResourceUnavailableException - the resource is locked by another task
LengthErrorException - the name of the resource is too long