All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bea.jolt.JoltRemoteService

java.lang.Object
   |
   +----bea.jolt.JoltRequest
           |
           +----bea.jolt.JoltRemoteService

public class JoltRemoteService
extends JoltRequest
implements Message
JoltRemoteService provides an implementation of the Tuxedo synchronous Request/Reply communication model. Jolt treats each Tuxedo service as a remote service, and each service has its input and output parameters. Typically, the user sets the input parameters through the various setXXX and addXXX methods, then invokes the call() method. Upon successful completion, the user retreives the results through the various getXXX methods. Since Queue is not supported in release 1.0, this class is extended from JoltRequest and implements RemoteService/Message to reduce the class file size. When Queue is supported in a later release, this class and RemoteQueue will be extended from JoltRequestMessage to share the single implementation of Message.

See Also:
JoltSession, JoltTransaction

Constructor Index

 o JoltRemoteService(String, Session)
This constructor gets the service that matches the definition in the repository.
 o JoltRemoteService(String, Session, int)
This constructor ensures that the version between client program and the data in repository match.

Method Index

 o addByte(String, byte)
Add a byte value occurrence of an item referred by its name.
 o addBytes(String, byte[], int)
Add a byte-array value occurrence of an item referred by its name.
 o addDouble(String, double)
Add a double value occurrence of an item referred by its name.
 o addFloat(String, float)
Add a float value occurrence of an item referred by its name.
 o addInt(String, int)
Add a int value occurrence of an item referred by its name.
 o addShort(String, short)
Add a short value occurrence of an item referred by its name.
 o addString(String, String)
Add a string value occurrence of an item referred by its name.
 o call(Transaction)
Perform the synchronized request/reply.
 o clear()
Clear the input and output attributes, and the priority.
 o delete(String)
Delete the first instance of an item referred by its name.
 o deleteItem(String, int)
Delete a particular occurrence of an item referred by its name.
 o done()
Done with this service object and perform some clean up.
 o getApplicationCode()
Get the return code from the application; it is equivalent to the tpurcode or the second parameter of tpreturn(3) from ATMI.
 o getByteDef(String, byte)
Get the byte value of the first occurrence of the item.
 o getByteItemDef(String, int, byte)
Get the byte value of an occurrence of the item.
 o getBytesDef(String, byte[])
Get the byte-array value of the first occurrence of the item.
 o getBytesItemDef(String, int, byte[])
Get the byte-array value of an occurrence of the item.
 o getDefinition()
Get the reference to the service definition.
 o getDoubleDef(String, double)
Get the double value of the first occurrence of the item.
 o getDoubleItemDef(String, int, double)
Get the double value of an occurrence of the item.
 o getFloatDef(String, float)
Get the float value of the first occurrence of the item.
 o getFloatItemDef(String, int, float)
Get the float value of an occurrence of the item.
 o getInputs()
Get the input parameter message buffer.
 o getIntDef(String, int)
Get the int value of the first occurrence of the item.
 o getIntItemDef(String, int, int)
Get the int value of an occurrence of the item.
 o getName()
Get the name of this service.
 o getOccurrenceCount(String)
Get the occurrence count of an item referred by its name.
 o getOutputs()
Get the output parameter message buffer.
 o getRequestType()
Get the type of this request object.
 o getShortDef(String, short)
Get the short value of the first occurrence of the item.
 o getShortItemDef(String, int, short)
Get the short value of an occurrence of the item.
 o getStringDef(String, String)
Get the string value of the first occurrence of the item.
 o getStringItemDef(String, int, String)
Get the string value of an occurrence of the item.
 o setByte(String, byte)
Set or change the byte value of the first occurrence of an item referred by its name.
 o setByteItem(String, int, byte)
Set or change the byte value of a particular item referred by its name.
 o setBytes(String, byte[], int)
Set or change the byte-array value of the first occurrence of an item referred by its name.
 o setBytesItem(String, int, byte[], int)
Set or change the byte-array value of a particular item referred by its name.
 o setDouble(String, double)
Set or change the double value of the first occurrence of an item referred by its name.
 o setDoubleItem(String, int, double)
Set or change the double value of a particular item referred by its name.
 o setFloat(String, float)
Set or change the float value of the first occurrence of an item referred by its name.
 o setFloatItem(String, int, float)
Set or change the float value of a particular item referred by its name.
 o setInt(String, int)
Set or change the int value of the first occurrence of an item referred by its name.
 o setIntItem(String, int, int)
Set or change the int value of a particular item referred by its name.
 o setShort(String, short)
Set or change the short value of the first occurrence of an item referred by its name.
 o setShortItem(String, int, short)
Set or change the short value of a particular item referred by its name.
 o setString(String, String)
Set or change the string value of the first occurrence of an item referred by its name.
 o setStringItem(String, int, String)
Set or change the string value of a particular item referred by its name.
 o toString()
Get the service name of this object.

Constructors

 o JoltRemoteService
 public JoltRemoteService(String name,
                          Session s) throws ServiceException
This constructor gets the service that matches the definition in the repository. It does NOT enforce the client program to be in sync with the repository. Typically, generic application (which is not bounded with any defintion) will use this constructor.

Parameters:
name - the service name
s - the session object
Throws: ServiceException
Invalid session or no such service.
 o JoltRemoteService
 public JoltRemoteService(String name,
                          Session s,
                          int version) throws ServiceException, JoltVersionException
This constructor ensures that the version between client program and the data in repository match. If the user is concerned with the version, use of this constructor is recommended.

Parameters:
name - the service name
s - the session object
version - the version number
Throws: ServiceException
Invalid session, the service does not exist, or is not exported.
Throws: JoltVersionException
No such version.

Methods

 o done
 public void done()
Done with this service object and perform some clean up. This object is no longer valid.

 o getRequestType
 public int getRequestType()
Get the type of this request object.

Returns:
Always returns SERVICE.
Overrides:
getRequestType in class JoltRequest
 o getName
 public String getName()
Get the name of this service.

Returns:
The name of this service.
Overrides:
getName in class JoltRequest
 o getApplicationCode
 public int getApplicationCode()
Get the return code from the application; it is equivalent to the tpurcode or the second parameter of tpreturn(3) from ATMI.

Returns:
The application return code.
 o getDefinition
 public JoltDefinition getDefinition()
Get the reference to the service definition. Note, caller should not modify the return object.

Returns:
The service definition.
See Also:
JoltDefinition
 o call
 public void call(Transaction trans) throws ServiceException, TransactionException, ApplicationException
Perform the synchronized request/reply. User should use set/add methods to set the input attributes prior to this method. If the user wants to include this request/reply in a transaction, a transaction object must be passed in. Excluding this request/reply from a transaction or invoking this service without any transaction, the "trans" parameter should be set to null. Upon successful completion, user can use getXXX methods to retrieve the results. When the transactional service is invoked, the receiving timeout is automatically set to the greater value of the transaction timeout or the default receiving timeout.

Parameters:
trans - the transaction object or null
Throws: ServiceException
Tuxedo system level error has occurred.
Throws: TransactionException
Invalid transaction object, the transaction has been suspended or aborted, or time-out has occurred.
Throws: ApplicationException
Application level error has occurred.
See Also:
clear, JoltTransaction
 o toString
 public String toString()
Get the service name of this object.

Returns:
the service name.
Overrides:
toString in class Object
 o clear
 public void clear()
Clear the input and output attributes, and the priority.

 o addByte
 public void addByte(String name,
                     byte val)
Add a byte value occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The byte value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o addShort
 public void addShort(String name,
                      short val)
Add a short value occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The short value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o addInt
 public void addInt(String name,
                    int val)
Add a int value occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The int value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o addFloat
 public void addFloat(String name,
                      float val)
Add a float value occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The float value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o addDouble
 public void addDouble(String name,
                       double val)
Add a double value occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The double value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o addString
 public void addString(String name,
                       String val)
Add a string value occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The string value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o addBytes
 public void addBytes(String name,
                      byte val[],
                      int len)
Add a byte-array value occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The byte-array value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setByte
 public void setByte(String name,
                     byte val)
Set or change the byte value of the first occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The byte value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setShort
 public void setShort(String name,
                      short val)
Set or change the short value of the first occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The short value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setInt
 public void setInt(String name,
                    int val)
Set or change the int value of the first occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The int value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setFloat
 public void setFloat(String name,
                      float val)
Set or change the float value of the first occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The float value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setDouble
 public void setDouble(String name,
                       double val)
Set or change the double value of the first occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The double value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setString
 public void setString(String name,
                       String val)
Set or change the string value of the first occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The string value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setBytes
 public void setBytes(String name,
                      byte val[],
                      int len)
Set or change the byte-array value of the first occurrence of an item referred by its name.

Parameters:
name - The name of the item.
val - The byte-array value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setByteItem
 public void setByteItem(String name,
                         int itemNo,
                         byte val)
Set or change the byte value of a particular item referred by its name. The instance starts from 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The byte value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setShortItem
 public void setShortItem(String name,
                          int itemNo,
                          short val)
Set or change the short value of a particular item referred by its name. The instance starts from 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The short value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setIntItem
 public void setIntItem(String name,
                        int itemNo,
                        int val)
Set or change the int value of a particular item referred by its name. The instance starts from 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The int value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setFloatItem
 public void setFloatItem(String name,
                          int itemNo,
                          float val)
Set or change the float value of a particular item referred by its name. The instance starts from 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The float value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setDoubleItem
 public void setDoubleItem(String name,
                           int itemNo,
                           double val)
Set or change the double value of a particular item referred by its name. The instance starts from 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The double value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setStringItem
 public void setStringItem(String name,
                           int itemNo,
                           String val)
Set or change the string value of a particular item referred by its name. The instance starts from 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The string value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o setBytesItem
 public void setBytesItem(String name,
                          int itemNo,
                          byte val[],
                          int len)
Set or change the byte-array value of a particular item referred by its name. The instance starts from 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The byte-array value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an output field.
 o delete
 public void delete(String name)
Delete the first instance of an item referred by its name.

Parameters:
name - The name of the item.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o deleteItem
 public void deleteItem(String name,
                        int itemNo)
Delete a particular occurrence of an item referred by its name.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getOccurrenceCount
 public int getOccurrenceCount(String name)
Get the occurrence count of an item referred by its name.

Parameters:
name - The name of the item.
Returns:
The number of occurrence.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getByteDef
 public byte getByteDef(String name,
                        byte def)
Get the byte value of the first occurrence of the item. If the item does not exist, the default value will be returned.

Parameters:
name - The name fo the item.
def - The default byte value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getShortDef
 public short getShortDef(String name,
                          short def)
Get the short value of the first occurrence of the item. If the item does not exist, the default value will be returned.

Parameters:
name - The name fo the item.
def - The default short value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getIntDef
 public int getIntDef(String name,
                      int def)
Get the int value of the first occurrence of the item. If the item does not exist, the default value will be returned.

Parameters:
name - The name fo the item.
def - The default int value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getFloatDef
 public float getFloatDef(String name,
                          float def)
Get the float value of the first occurrence of the item. If the item does not exist, the default value will be returned.

Parameters:
name - The name fo the item.
def - The default float value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getDoubleDef
 public double getDoubleDef(String name,
                            double def)
Get the double value of the first occurrence of the item. If the item does not exist, the default value will be returned.

Parameters:
name - The name fo the item.
def - The default double value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getStringDef
 public String getStringDef(String name,
                            String def)
Get the string value of the first occurrence of the item. If the item does not exist, the default value will be returned.

Parameters:
name - The name fo the item.
def - The default string value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getBytesDef
 public byte[] getBytesDef(String name,
                           byte def[])
Get the byte-array value of the first occurrence of the item. If the item does not exist, the default value will be returned.

Parameters:
name - The name fo the item.
def - The default byte-array value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getByteItemDef
 public byte getByteItemDef(String name,
                            int itemNo,
                            byte def)
Get the byte value of an occurrence of the item. If the item or its occurrence does not exist, the default value will be returned. The occurence number starts at 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
def - The default byte value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getShortItemDef
 public short getShortItemDef(String name,
                              int itemNo,
                              short def)
Get the short value of an occurrence of the item. If the item or its occurrence does not exist, the default value will be returned. The occurence number starts at 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
def - The default short value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getIntItemDef
 public int getIntItemDef(String name,
                          int itemNo,
                          int def)
Get the int value of an occurrence of the item. If the item or its occurrence does not exist, the default value will be returned. The occurence number starts at 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
def - The default int value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getFloatItemDef
 public float getFloatItemDef(String name,
                              int itemNo,
                              float def)
Get the float value of an occurrence of the item. If the item or its occurrence does not exist, the default value will be returned. The occurence number starts at 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
def - The default float value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getDoubleItemDef
 public double getDoubleItemDef(String name,
                                int itemNo,
                                double def)
Get the double value of an occurrence of the item. If the item or its occurrence does not exist, the default value will be returned. The occurence number starts at 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
def - The default double value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getStringItemDef
 public String getStringItemDef(String name,
                                int itemNo,
                                String def)
Get the string value of an occurrence of the item. If the item or its occurrence does not exist, the default value will be returned. The occurence number starts at 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
def - The default string value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getBytesItemDef
 public byte[] getBytesItemDef(String name,
                               int itemNo,
                               byte def[])
Get the byte-array value of an occurrence of the item. If the item or its occurrence does not exist, the default value will be returned. The occurence number starts at 0.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
def - The default byte-array value.
Throws: NoSuchFieldError
It is an invalid name.
Throws: IllegalAccessError
It is not an input field.
 o getInputs
 public JoltMessage getInputs()
Get the input parameter message buffer.

See Also:
JoltMessage
 o getOutputs
 public JoltMessage getOutputs()
Get the output parameter message buffer.

See Also:
JoltMessage

All Packages  Class Hierarchy  This Package  Previous  Next  Index