All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----tascomm.dts.DTSMessage
DTSMessage
class provides a Java applet or application
all the functionality required for the execution of synchronous (on-line)
DTS transactions against a remote DTS server system. The DTSMessage
object is a complete DTS transaction context itself, containing all message
input and output parameter areas and transaction control methods.
The Java applet or application may request a DTS back-end Handler application to be executed at a remote system, pass input data for the Handler and receive response data when the execution completes. The remote system may be the server where the client Java applet was loaded from (the default) or some other DTS environment connected to it (via DTS transparent routing). In case of a stand-alone Java application the default receiver is always the host the application is running in.
The version 1.0 of DTSJAVA package supports only transfer of text data.
Thus the input and output data of transactions should be processed
via Java String
class objects by the calling application.
Further releases of DTSJAVA will incorporate methods for binary data
usage and conversion from and to other Java data types.
For detailed information about the Distributed Transaction System middleware products, refer to separate documentation, or directly to the Tascomm Engineering WWW site at http://www.tascomm.fi.
DTSMessage
object without any predefined
transaction parameters.
DTSMessage
object for the given source
applet, without any predefined transaction parameters.
DTSMessage
for the given source
applet, with the specified remote Handler name.
DTSMessage
for the given source
applet, with the specified remote Handler and and user input data area.
DTSMessage
for the given source
applet, with the specified remote Handler, receiver node and user input data area.
DTSMessage
with the specified remote
Handler name.
DTSMessage
with the specified remote
Handler and and user input data area.
DTSMessage
with the specified remote
Handler, receiver node and user input data area.
public DTSMessage()
DTSMessage
object without any predefined
transaction parameters. At least the remote back-end Handler name
must be set afterwards using the setHandler
method.
If the program is an applet instead of a stand-alone application,
it must also identify itself by using the setSourceApplet
method.
public DTSMessage(Applet sapplet)
DTSMessage
object for the given source
applet, without any predefined transaction parameters.
At least the remote back-end Handler name
must be set afterwards using the setHandler
method.
The source applet is used to determine the target DTS server
system, which is always the host where the applet was loaded from.
public DTSMessage(String handler)
DTSMessage
with the specified remote
Handler name. The Handler name may be changed at a later time
using the setHandler
method. DTS Handler names are non
case-sensitive strings with a maximum length of 8 characters.
public DTSMessage(Applet sapplet, String handler)
DTSMessage
for the given source
applet, with the specified remote Handler name.
The Handler name may be changed at a later time
using the setHandler
method. DTS Handler names are non
case-sensitive strings with a maximum length of 8 characters.
The source applet is used to determine the target DTS server
system, which is always the host where the applet was loaded from.
public DTSMessage(String handler, String data)
DTSMessage
with the specified remote
Handler and and user input data area. The parameters may be changed at a later time
using the setHandler
and setDataString
methods.
DTS Handler name is a non case-sensitive string with a maximum length of
8 characters. The maximum length of user input data for a DTS message is
31922 characters.
public DTSMessage(Applet sapplet, String handler, String data)
DTSMessage
for the given source
applet, with the specified remote Handler and and user input data area.
The parameters may be changed at a later time
using the setHandler
and setDataString
methods.
DTS Handler name is a non case-sensitive string with a maximum length of
8 characters. The maximum length of user input data for a DTS message is
31922 characters.
The source applet is used to determine the target DTS server
system, which is always the host where the applet was loaded from.
public DTSMessage(String handler, String node, String data)
DTSMessage
with the specified remote
Handler, receiver node and user input data area.
The parameters and message data may be changed at a later time
using the setHandler
, setReceiver
and
setDataString
methods.
The receiver node must be set only if the target DTS system is not the server
where the applet was loaded from, or in case of a stand-alone Java application
the localhost. This is called the default DTS receiver. If a node name is specified,
the actual transaction goes through the default server which passes it further
using DTS transparent routing capabilities. DTS Handler and node names are non
case-sensitive strings with a maximum length of 8 characters. The maximum length
of user input data for a DTS message is 31922 characters.
public DTSMessage(Applet sapplet, String handler, String node, String data)
DTSMessage
for the given source
applet, with the specified remote Handler, receiver node and user input data area.
The parameters and message data may be changed at a later time
using the setHandler
, setReceiver
and
setDataString
methods.
The receiver node must be set only if the target DTS system is not the server
where the applet was loaded from, or in case of a stand-alone Java application
the localhost. This is called the default DTS receiver. If a node name is specified,
the actual transaction goes through the default server which passes it further
using DTS transparent routing capabilities. DTS Handler and node names are non
case-sensitive strings with a maximum length of 8 characters. The maximum length
of user input data for a DTS message is 31922 characters.
The source applet is used to determine the target DTS server
system, which is always the host where the applet was loaded from.
public void setSourceApplet(Applet sapplet)
Applet
class can
be passed to this method. Typically your applet would issue
setSourceApplet(this)
before executing the transaction.
The source applet may be given in the DTSMessage
class
constructors as well to avoid a separate call to this method.
If your applet does not identify itself to the DTSMessage
object, executing a transaction will most probably result in an
exception indicating that the program is unable to connect to the local
host running the browser. Instead of the local host an applet would want
to target its DTS messages to the server host.
public void setTargetPort(int tcpport)
The usage of this method is not encouraged to allow highest possible isolation of network dependent issues in the user application. In all cases the listening port on the server side should be set to 2424 if possible. The target port should be set to something else by the calling Java program only if there is no chance to use the default at the server.
public void setHandler(String handler) throws IllegalParameterException
execute
method.
DTS Handler names are non case-sensitive strings with a maximum length
of 8 characters.
public void setReceiver(String receiver) throws IllegalParameterException
DTSMessage
object is being created.
public void setDataString(String msgData) throws IllegalLengthException
String
and internally converted into format suitable for DTS network transmission.
All the necessary multinational and special character conversions are performed
automatically by the underlying mechanisms. However, the set of special
characters that DTS can properly convert between different environments depends
on the target systems in question (for example, ASCII vs. IBM EBCDIC).
The number of characters in the given String
directly
reflects the number of bytes in the constructed DTS input message user data area.
Binary data transfer is not supported in version 1.0 of DTSJAVA package.
The maximum length of a DTS message is 32000 bytes. However, the underlying
interface reserves two 39-byte header areas for its own use, thus leaving
a maximum of 31922 bytes (characters) for the use of user input data.
public void execute() throws CommunicationException, UnknownNodeException, UnknownHandlerException, SecurityViolationException, CriticalException, IllegalParameterException
public String getDataString() throws IllegalStateException
String
and internally converted from the DTS network transmission format.
All the necessary multinational and special character conversions are performed
automatically by the underlying mechanisms. However, the set of special
characters that DTS can properly convert between different environments depends
on the target systems in question (for example, ASCII vs. IBM EBCDIC).
The number of characters in the returned String
directly
reflects the number of bytes in the returned DTS output message user data area.
Binary data transfer is not supported in version 1.0 of DTSJAVA package.
The maximum length of a DTS message is 32000 bytes. However, the underlying interface reserves two bytes for the DTS return code, thus leaving a maximum of 31998 bytes (characters) for the use of user output data.
public int getReturnCode() throws IllegalStateException
execute
method have been catched and processed properly. The getReturnCode
method of the DTSException
class can be used in the catch block
of the code to check the actual numeric code when a transaction failure occurs.
public String getTimeStamp() throws IllegalStateException
String
of 12 characters long, where the format is always YDDDHHMMSSXX:
Y =
Last digit of current year
DDD =
Day of year (1-366)
HH =
Hours (00-23)
MM =
Minutes (00-59)
SS =
Seconds (00-59)
XX =
Hundreths of a second (00-99)
public String getSender() throws IllegalStateException
All Packages Class Hierarchy This Package Previous Next Index