org.mule.transport.legstar.tcp
Class LegstarTcpProtocol

java.lang.Object
  extended by org.mule.transport.tcp.protocols.AbstractByteProtocol
      extended by org.mule.transport.tcp.protocols.DirectProtocol
          extended by org.mule.transport.legstar.tcp.LegstarTcpProtocol
All Implemented Interfaces:
org.mule.transport.tcp.TcpProtocol

public class LegstarTcpProtocol
extends org.mule.transport.tcp.protocols.DirectProtocol

This application level protocol is compatible with the LegStar z/OS LSOKBIN module. After the initial connection dialog, the client is expected to send data formatted like so: Data item Length Offset Purpose -------------- ------ ------ ----------------- Message type 8 0 Type of service String delimiter 1 8 Binary zero Message x 9 Variable size Acceptable values for message types are: LSOKEXEC :A request to execute a program. LSOKDATA :Input data for a request. LSOKUOWC :A unit of work command. LSOKPROB :A probe used to check if server is alive.


Field Summary
static String DATA_MSG_EC
          Eye catcher for data messages.
static String EXEC_REQUEST_EC
          Identifies execution requests.
static int MAX_PROT_REPLY_LEN
          Maximum size of the host reply for acknowledgements and error reports.
static String REPLY_ERROR_MSG_EC
          Reply eye catcher for errors.
static int REPLY_HDR_LEN
          Size of header preceding any reply from host.
 
Fields inherited from class org.mule.transport.tcp.protocols.DirectProtocol
bufferSize, UNLIMITED
 
Fields inherited from class org.mule.transport.tcp.protocols.AbstractByteProtocol
EOF, NO_STREAM, STREAM_OK
 
Constructor Summary
LegstarTcpProtocol()
           
 
Method Summary
 Object read(InputStream is)
           Receive formated response from LSSOKBIN.
protected  void writeByteArray(OutputStream os, byte[] data)
           Send a formated request to LSSOKBIN.
 
Methods inherited from class org.mule.transport.tcp.protocols.DirectProtocol
isRepeat, read, remaining
 
Methods inherited from class org.mule.transport.tcp.protocols.AbstractByteProtocol
copy, copy, createResponse, isRethrowExceptionOnRead, nullEmptyArray, safeRead, safeRead, setRethrowExceptionOnRead, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXEC_REQUEST_EC

public static final String EXEC_REQUEST_EC
Identifies execution requests. TODO use CicsSocket.

See Also:
Constant Field Values

REPLY_HDR_LEN

public static final int REPLY_HDR_LEN
Size of header preceding any reply from host. TODO use CicsSocket.

See Also:
Constant Field Values

DATA_MSG_EC

public static final String DATA_MSG_EC
Eye catcher for data messages. TODO use CicsSocket.

See Also:
Constant Field Values

REPLY_ERROR_MSG_EC

public static final String REPLY_ERROR_MSG_EC
Reply eye catcher for errors. TODO use CicsSocket.

See Also:
Constant Field Values

MAX_PROT_REPLY_LEN

public static final int MAX_PROT_REPLY_LEN
Maximum size of the host reply for acknowledgements and error reports. TODO make public. TODO use CicsSocket.

See Also:
Constant Field Values
Constructor Detail

LegstarTcpProtocol

public LegstarTcpProtocol()
Method Detail

writeByteArray

protected void writeByteArray(OutputStream os,
                              byte[] data)
                       throws IOException
Send a formated request to LSSOKBIN.

Overrides:
writeByteArray in class org.mule.transport.tcp.protocols.AbstractByteProtocol
Throws:
IOException

read

public Object read(InputStream is)
            throws IOException
Receive formated response from LSSOKBIN.

Transforms any application level errors into IOExceptions.

Specified by:
read in interface org.mule.transport.tcp.TcpProtocol
Overrides:
read in class org.mule.transport.tcp.protocols.DirectProtocol
Throws:
IOException


Copyright © 2013 LegSem. All Rights Reserved.