bea.jolt
Class JoltDefinition

java.lang.Object
  |
  +--bea.jolt.JoltDefAttrs
        |
        +--bea.jolt.JoltDefinition

public class JoltDefinition
extends bea.jolt.JoltDefAttrs
implements bea.jolt.Definition

This class represents the definition of a Jolt object that can be both a service and an asynchronous message.

See Also:
JoltRemoteService, bea.jolt.JoltMessage

Fields inherited from class bea.jolt.JoltDefAttrs
AVLIST, BINARY, BOP, BYTE, CONVERSATION, DOUBLE, EOP, EVENT, FLOAT, IBUFTYPE, INTEGER, IVIEWNAME, MANDATORY, NOACC, OBUFTYPE, OPTIONAL, OVIEWNAME, PARMACC, PARMDESC, PARMFID, PARMFINDEX, PARMFNAME, PARMLEN, PARMNAME, PARMOCC, PARMSTATUS, PARMTYPE, QSPACE, QUEUE, RDONLY, RDWR, SERVICE, SHORT, STRING, VERSION, WRONLY
 
Constructor Summary
JoltDefinition(java.lang.String svcdef)
          This constructor takes a string definition and converts it to an object.
JoltDefinition(java.lang.String name, java.lang.String typeName)
          This constructor builds a new definition.
 
Method Summary
 bea.jolt.JoltParam addParam(java.lang.String nm, bea.jolt.JoltParam param, bea.jolt.JoltParam prev)
          Adds a parameter to the hash table and the linked list.
 java.util.Enumeration getKeys()
          Enumerates the property keys.
 java.lang.String getName()
          Gets the name of the definition (such as the service name) for this object.
 bea.jolt.JoltParam getParam(java.lang.String name)
          Gets the parameter object for the name.
 java.util.Enumeration getParams()
          Enumerates the parameter list.
 java.lang.String getProperty(java.lang.String name)
          Gets a property element of the definition.
 int getType()
          Gets the type of definition.
 java.lang.String getTypeName()
          Gets the key token to the reposository.
 int getVersion()
          Gets the version number of the definition.
 java.lang.String id2name(int id)
          Gets the parameter name based on the field id.
 int numParams()
          Gets the number of parameters in the definition.
 void putProperty(java.lang.String name, java.lang.String val)
          Puts a property element for the definition.
 java.lang.String toString()
          Builds the definition string from this object.
 
Methods inherited from class bea.jolt.JoltDefAttrs
getInteger
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoltDefinition

public JoltDefinition(java.lang.String name,
                      java.lang.String typeName)
This constructor builds a new definition.
Parameters:
name - The service name.
typeName - The key to the repository.

JoltDefinition

public JoltDefinition(java.lang.String svcdef)
               throws bea.jolt.DefinitionException
This constructor takes a string definition and converts it to an object.
Parameters:
svcdef - The definition in a string.
Throws:
bea.jolt.DefinitionException - Malformed definition.
Method Detail

getName

public java.lang.String getName()
Gets the name of the definition (such as the service name) for this object.
Specified by:
getName in interface bea.jolt.Definition
Returns:
The definition name.

getVersion

public int getVersion()
Gets the version number of the definition.
Specified by:
getVersion in interface bea.jolt.Definition
Returns:
The definition version number.

getTypeName

public java.lang.String getTypeName()
Gets the key token to the reposository.

getType

public int getType()
Gets the type of definition.
Specified by:
getType in interface bea.jolt.Definition
Returns:
The type of the definition.
See Also:
Request#SERVICE, Request#QUEUE

numParams

public int numParams()
Gets the number of parameters in the definition.
Returns:
The number of parameters.

getParams

public java.util.Enumeration getParams()
Enumerates the parameter list.
Specified by:
getParams in interface bea.jolt.Definition
Returns:
Enumeration of the parameter.

id2name

public java.lang.String id2name(int id)
Gets the parameter name based on the field id. This method uses a sequential search, so it may be very slow.

getParam

public bea.jolt.JoltParam getParam(java.lang.String name)
                            throws java.lang.NoSuchFieldError
Gets the parameter object for the name.
Parameters:
name - The parameter name.
Returns:
The parameter object.
Throws:
java.lang.NoSuchFieldError - The specified field does not exist.

getProperty

public java.lang.String getProperty(java.lang.String name)
Gets a property element of the definition.
Specified by:
getProperty in interface bea.jolt.Definition
Parameters:
name - The property name.
Returns:
The property value.

putProperty

public void putProperty(java.lang.String name,
                        java.lang.String val)
Puts a property element for the definition.
Parameters:
name - The property name.
val - The property value.

getKeys

public java.util.Enumeration getKeys()
Enumerates the property keys.
Returns:
The enumeration of the property keys.

toString

public java.lang.String toString()
Builds the definition string from this object.
Returns:
The definition string.
Overrides:
toString in class java.lang.Object

addParam

public bea.jolt.JoltParam addParam(java.lang.String nm,
                                   bea.jolt.JoltParam param,
                                   bea.jolt.JoltParam prev)
Adds a parameter to the hash table and the linked list. This method returns the current param, which must be passed back as the "prev" in the subsequent call. When calling this method the first time, "prev" must be null.
Parameters:
nm - The name of the parameter.
param - The parameter object to be added.
prev - The previous parameter object.
Returns:
The added parameter object.