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 definition.
 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

QUEUE

public static final java.lang.String QUEUE

EVENT

public static final java.lang.String EVENT

CONVERSATION

public static final java.lang.String CONVERSATION

VERSION

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

QSPACE

public static final java.lang.String QSPACE

IBUFTYPE

public static final java.lang.String IBUFTYPE

OBUFTYPE

public static final java.lang.String OBUFTYPE

IVIEWNAME

public static final java.lang.String IVIEWNAME

OVIEWNAME

public static final java.lang.String OVIEWNAME

BOP

public static final java.lang.String BOP

EOP

public static final java.lang.String EOP

PARMNAME

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

PARMTYPE

public static final java.lang.String PARMTYPE

PARMLEN

public static final java.lang.String PARMLEN

PARMDESC

public static final java.lang.String PARMDESC

PARMFID

public static final java.lang.String PARMFID

PARMACC

public static final java.lang.String PARMACC

PARMSTATUS

public static final java.lang.String PARMSTATUS

PARMOCC

public static final java.lang.String PARMOCC

PARMFNAME

public static final java.lang.String PARMFNAME

PARMFINDEX

public static final java.lang.String PARMFINDEX

BYTE

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

SHORT

public static final java.lang.String SHORT

INTEGER

public static final java.lang.String INTEGER

FLOAT

public static final java.lang.String FLOAT

DOUBLE

public static final java.lang.String DOUBLE

BINARY

public static final java.lang.String BINARY

STRING

public static final java.lang.String STRING

AVLIST

public static final java.lang.String AVLIST

NOACC

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

RDONLY

public static final java.lang.String RDONLY

WRONLY

public static final java.lang.String WRONLY

RDWR

public static final java.lang.String RDWR

MANDATORY

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

OPTIONAL

public static final java.lang.String OPTIONAL
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 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.

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.
Overrides:
toString in class java.lang.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.