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
-
JoltRemoteService(String, Session)
- This constructor gets the service that matches the definition in the
repository.
-
JoltRemoteService(String, Session, int)
- This constructor ensures that the version between client program and
the data in repository match.
-
addByte(String, byte)
- Add a byte value occurrence of an item referred by its name.
-
addBytes(String, byte[], int)
- Add a byte-array value occurrence of an item referred by its name.
-
addDouble(String, double)
- Add a double value occurrence of an item referred by its name.
-
addFloat(String, float)
- Add a float value occurrence of an item referred by its name.
-
addInt(String, int)
- Add a int value occurrence of an item referred by its name.
-
addShort(String, short)
- Add a short value occurrence of an item referred by its name.
-
addString(String, String)
- Add a string value occurrence of an item referred by its name.
-
call(Transaction)
- Perform the synchronized request/reply.
-
clear()
- Clear the input and output attributes, and the priority.
-
delete(String)
- Delete the first instance of an item referred by its name.
-
deleteItem(String, int)
- Delete a particular occurrence of an item referred by its name.
-
done()
- Done with this service object and perform some clean up.
-
getApplicationCode()
- Get the return code from the application; it is equivalent to the
tpurcode or the second parameter of tpreturn(3) from ATMI.
-
getByteDef(String, byte)
- Get the byte value of the first occurrence of the item.
-
getByteItemDef(String, int, byte)
- Get the byte value of an occurrence of the item.
-
getBytesDef(String, byte[])
- Get the byte-array value of the first occurrence of the item.
-
getBytesItemDef(String, int, byte[])
- Get the byte-array value of an occurrence of the item.
-
getDefinition()
- Get the reference to the service definition.
-
getDoubleDef(String, double)
- Get the double value of the first occurrence of the item.
-
getDoubleItemDef(String, int, double)
- Get the double value of an occurrence of the item.
-
getFloatDef(String, float)
- Get the float value of the first occurrence of the item.
-
getFloatItemDef(String, int, float)
- Get the float value of an occurrence of the item.
-
getInputs()
- Get the input parameter message buffer.
-
getIntDef(String, int)
- Get the int value of the first occurrence of the item.
-
getIntItemDef(String, int, int)
- Get the int value of an occurrence of the item.
-
getName()
- Get the name of this service.
-
getOccurrenceCount(String)
- Get the occurrence count of an item referred by its name.
-
getOutputs()
- Get the output parameter message buffer.
-
getRequestType()
- Get the type of this request object.
-
getShortDef(String, short)
- Get the short value of the first occurrence of the item.
-
getShortItemDef(String, int, short)
- Get the short value of an occurrence of the item.
-
getStringDef(String, String)
- Get the string value of the first occurrence of the item.
-
getStringItemDef(String, int, String)
- Get the string value of an occurrence of the item.
-
setByte(String, byte)
- Set or change the byte value of the first occurrence of an item
referred by its name.
-
setByteItem(String, int, byte)
- Set or change the byte value of a particular item referred by its
name.
-
setBytes(String, byte[], int)
- Set or change the byte-array value of the first occurrence of an
item referred by its name.
-
setBytesItem(String, int, byte[], int)
- Set or change the byte-array value of a particular item referred
by its name.
-
setDouble(String, double)
- Set or change the double value of the first occurrence of an item
referred by its name.
-
setDoubleItem(String, int, double)
- Set or change the double value of a particular item referred by its
name.
-
setFloat(String, float)
- Set or change the float value of the first occurrence of an item
referred by its name.
-
setFloatItem(String, int, float)
- Set or change the float value of a particular item referred by its
name.
-
setInt(String, int)
- Set or change the int value of the first occurrence of an item
referred by its name.
-
setIntItem(String, int, int)
- Set or change the int value of a particular item referred by its
name.
-
setShort(String, short)
- Set or change the short value of the first occurrence of an item
referred by its name.
-
setShortItem(String, int, short)
- Set or change the short value of a particular item referred by its
name.
-
setString(String, String)
- Set or change the string value of the first occurrence of an item
referred by its name.
-
setStringItem(String, int, String)
- Set or change the string value of a particular item referred by its
name.
-
toString()
- Get the service name of this object.
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.
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.
done
public void done()
- Done with this service object and perform some clean up. This
object is no longer valid.
getRequestType
public int getRequestType()
- Get the type of this request object.
- Returns:
- Always returns SERVICE.
- Overrides:
- getRequestType in class JoltRequest
getName
public String getName()
- Get the name of this service.
- Returns:
- The name of this service.
- Overrides:
- getName in class JoltRequest
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.
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
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
toString
public String toString()
- Get the service name of this object.
- Returns:
- the service name.
- Overrides:
- toString in class Object
clear
public void clear()
- Clear the input and output attributes, and the priority.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
getInputs
public JoltMessage getInputs()
- Get the input parameter message buffer.
- See Also:
- JoltMessage
getOutputs
public JoltMessage getOutputs()
- Get the output parameter message buffer.
- See Also:
- JoltMessage
All Packages Class Hierarchy This Package Previous Next Index