bea.jolt
Class JoltDefinition

java.lang.Object
  bea.jolt.JoltDefAttrs
      bea.jolt.JoltDefinition
All Implemented Interfaces:
bea.jolt.Definition

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, JoltMessage

Field Summary
static java.lang.String AVLIST
           
static java.lang.String BINARY
           
static java.lang.String BOP
           
static java.lang.String BYTE
          supported data types ("pt") in human readable format
static java.lang.String CONVERSATION
           
static java.lang.String DOUBLE
           
static java.lang.String EOP
           
static java.lang.String EVENT
           
static java.lang.String FLOAT
           
static java.lang.String IBUFTYPE
           
static java.lang.String INTEGER
           
static java.lang.String IVIEWNAME
           
static java.lang.String MANDATORY
          supported status type ("ps") - not used.
static java.lang.String NOACC
          supported access type ("pa")
static java.lang.String OBUFTYPE
           
static java.lang.String OPTIONAL
           
static java.lang.String OVIEWNAME
           
static java.lang.String PARMACC
           
static java.lang.String PARMDESC
           
static java.lang.String PARMFID
           
static java.lang.String PARMFINDEX
           
static java.lang.String PARMFNAME
           
static java.lang.String PARMLEN
           
static java.lang.String PARMNAME
          Jolt well-known properties for parameter
static java.lang.String PARMOCC
           
static java.lang.String PARMSTATUS
           
static java.lang.String PARMTYPE
           
static java.lang.String QSPACE
           
static java.lang.String QUEUE
           
static java.lang.String RDONLY
           
static java.lang.String RDWR
           
static java.lang.String SERVICE
          Supported definition types
static java.lang.String SHORT
           
static java.lang.String STRING
           
static java.lang.String VERSION
          Jolt well-known properties for definition
static java.lang.String WRONLY
           
 
Constructor Summary
JoltDefinition(java.lang.String svcdef)
          This constructor takes a string definition and converts it into an object.
JoltDefinition(java.lang.String name, java.lang.String typeName)
          This contstructor builds a new definition.
 
Method Summary
 JoltParam addParam(java.lang.String nm, JoltParam param, JoltParam prev)
          Add parameter to the hash table and the linked list.
static int getInteger(java.lang.String s)
          Parse the integer as Unix strtol(3C) function.
 java.util.Enumeration getKeys()
          Enumerates the property keys.
 java.lang.String getName()
          Get the name of the definition (e.g.
 JoltParam getParam(java.lang.String name)
          Get the parameter object for the name.
 java.util.Enumeration getParams()
          Enumerates the parameter list.
 java.lang.String getProperty(java.lang.String name)
          Get a property element of the definition.
 int getType()
          Get the type of definition.
 java.lang.String getTypeName()
          Get the key token to the repository.
 int getVersion()
          Get the version number of the definition.
 int numParams()
          Get the number of parameters in the hash (which excludes duplicate parameter definitions).
 int numParamsInList()
          Get the number of parameters in the list (which includes duplicate parameter definitions).
 void putProperty(java.lang.String name, java.lang.String val)
          Put a property element for the definition.
 java.lang.String toString()
          Build the definition string from this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVICE

public static final java.lang.String SERVICE
Supported definition types

See Also:
Constant Field Values

QUEUE

public static final java.lang.String QUEUE
See Also:
Constant Field Values

EVENT

public static final java.lang.String EVENT
See Also:
Constant Field Values

CONVERSATION

public static final java.lang.String CONVERSATION
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Jolt well-known properties for definition

See Also:
Constant Field Values

QSPACE

public static final java.lang.String QSPACE
See Also:
Constant Field Values

IBUFTYPE

public static final java.lang.String IBUFTYPE
See Also:
Constant Field Values

OBUFTYPE

public static final java.lang.String OBUFTYPE
See Also:
Constant Field Values

IVIEWNAME

public static final java.lang.String IVIEWNAME
See Also:
Constant Field Values

OVIEWNAME

public static final java.lang.String OVIEWNAME
See Also:
Constant Field Values

BOP

public static final java.lang.String BOP
See Also:
Constant Field Values

EOP

public static final java.lang.String EOP
See Also:
Constant Field Values

PARMNAME

public static final java.lang.String PARMNAME
Jolt well-known properties for parameter

See Also:
Constant Field Values

PARMTYPE

public static final java.lang.String PARMTYPE
See Also:
Constant Field Values

PARMLEN

public static final java.lang.String PARMLEN
See Also:
Constant Field Values

PARMDESC

public static final java.lang.String PARMDESC
See Also:
Constant Field Values

PARMFID

public static final java.lang.String PARMFID
See Also:
Constant Field Values

PARMACC

public static final java.lang.String PARMACC
See Also:
Constant Field Values

PARMSTATUS

public static final java.lang.String PARMSTATUS
See Also:
Constant Field Values

PARMOCC

public static final java.lang.String PARMOCC
See Also:
Constant Field Values

PARMFNAME

public static final java.lang.String PARMFNAME
See Also:
Constant Field Values

PARMFINDEX

public static final java.lang.String PARMFINDEX
See Also:
Constant Field Values

BYTE

public static final java.lang.String BYTE
supported data types ("pt") in human readable format

See Also:
Constant Field Values

SHORT

public static final java.lang.String SHORT
See Also:
Constant Field Values

INTEGER

public static final java.lang.String INTEGER
See Also:
Constant Field Values

FLOAT

public static final java.lang.String FLOAT
See Also:
Constant Field Values

DOUBLE

public static final java.lang.String DOUBLE
See Also:
Constant Field Values

BINARY

public static final java.lang.String BINARY
See Also:
Constant Field Values

STRING

public static final java.lang.String STRING
See Also:
Constant Field Values

AVLIST

public static final java.lang.String AVLIST
See Also:
Constant Field Values

NOACC

public static final java.lang.String NOACC
supported access type ("pa")

See Also:
Constant Field Values

RDONLY

public static final java.lang.String RDONLY
See Also:
Constant Field Values

WRONLY

public static final java.lang.String WRONLY
See Also:
Constant Field Values

RDWR

public static final java.lang.String RDWR
See Also:
Constant Field Values

MANDATORY

public static final java.lang.String MANDATORY
supported status type ("ps") - not used.

See Also:
Constant Field Values

OPTIONAL

public static final java.lang.String OPTIONAL
See Also:
Constant Field Values
Constructor Detail

JoltDefinition

public JoltDefinition(java.lang.String name,
                      java.lang.String typeName)
This contstructor builds a new definition.

Parameters:
name - The service name
typeName - The key to the repository.

JoltDefinition

public JoltDefinition(java.lang.String svcdef)
               throws DefinitionException
This constructor takes a string definition and converts it into an object.

Parameters:
svcdef - The definition in a string.
Throws:
DefinitionException - Malformed definition.
Method Detail

getName

public java.lang.String getName()
Get the name of the definition (e.g. the service name) for this object.

Specified by:
getName in interface bea.jolt.Definition
Returns:
The definition name.

getVersion

public int getVersion()
Get 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()
Get the key token to the repository.


getType

public int getType()
Get 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()
Get the number of parameters in the hash (which excludes duplicate parameter definitions).

Returns:
the number of parameters.

numParamsInList

public int numParamsInList()
Get the number of parameters in the list (which includes duplicate parameter definitions).

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.

getParam

public JoltParam getParam(java.lang.String name)
                   throws java.lang.NoSuchFieldError
Get the parameter object for the name.

Parameters:
name - the parameter name.
Returns:
the parameter object
Throws:
java.lang.NoSuchFieldError - This field does not exist.

getProperty

public java.lang.String getProperty(java.lang.String name)
Get 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)
Put 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()
Build the definition string from this object.

Returns:
The definition string.

addParam

public JoltParam addParam(java.lang.String nm,
                          JoltParam param,
                          JoltParam prev)
Add 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. The very first time to call this method, "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.

getInteger

public static int getInteger(java.lang.String s)
                      throws java.lang.NumberFormatException
Parse the integer as Unix strtol(3C) function. If s starts with 0x, it assumes the hex (radix 16) value. If s starts with 0, it assumes the octal (radix 8) value. Otherwise, decimal (radix 10) value is assumed.

Parameters:
s - String value to be parsed
Returns:
numeric value of the string
Throws:
java.lang.NumberFormatException - If the string contains unparseable integer.