com.stc.connector.tcpip.ext.msg
Class CustomEnvelopedMsgSample02
java.lang.Object
com.stc.connector.tcpip.ext.msg.CustomEnvelopedMsgSample02
- All Implemented Interfaces:
- EnvelopedMsgReceiver, EnvelopedMsgSender
public class CustomEnvelopedMsgSample02
- extends java.lang.Object
- implements EnvelopedMsgReceiver, EnvelopedMsgSender
A more general EndMarked envelope message:
The end marker can be String instead of a char.
Actually, you can extend it yourself as:
The end marker is another EnvelopedMsg.
The end marker is defauled as "".
Note: This sample is only used to demonstrate the extensibility of envelope type.
You can define your configuration parameters on your demand (for excample,
you can make the end marker configurable).
- Version:
- cvs revision: $Revision: 1.7 $ Last Modified: $Date: 2005/11/13 23:30:21 $
- Author:
- Harry Liu
Field Summary |
static java.lang.String |
version
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
version
public static final java.lang.String version
- See Also:
- Constant Field Values
CustomEnvelopedMsgSample02
public CustomEnvelopedMsgSample02()
- Constructor for CustomEnvelopedMsgSample02.
receiveEnvelopedMsg
public EnvelopedMsg receiveEnvelopedMsg(TCPIPEXTClientApplication app)
throws TCPIPApplicationException,
java.io.IOException
- Description copied from interface:
EnvelopedMsgReceiver
- Receives an EnvelopedMsg.
- Specified by:
receiveEnvelopedMsg
in interface EnvelopedMsgReceiver
- Parameters:
app
- TCPIPEXTClientApplication
- Returns:
- EnvelopedMsg instance
- Throws:
TCPIPApplicationException
- on error
java.io.IOException
- on i/o error- See Also:
(TCPIPEXTConnection)
sendEnvelopedMsg
public void sendEnvelopedMsg(EnvelopedMsg msg,
TCPIPEXTClientApplication app)
throws TCPIPApplicationException,
java.io.IOException
- Description copied from interface:
EnvelopedMsgSender
- Sends an EnvelopedMsg.
- Specified by:
sendEnvelopedMsg
in interface EnvelopedMsgSender
- Parameters:
msg
- EnvelopedMsg instanceapp
- TCPIPEXTClientApplication
- Throws:
TCPIPApplicationException
- on error
java.io.IOException
- on i/o error- See Also:
(EnvelopedMsg, TCPIPEXTClientApplication)