Package com.webmethods.jms.protocol
Class BinaryProtocolHandler.BinaryProtocol
- java.lang.Object
-
- com.webmethods.jms.protocol.BinaryProtocolHandler.BinaryProtocol
-
- Enclosing class:
- BinaryProtocolHandler
public class BinaryProtocolHandler.BinaryProtocol extends java.lang.Object implements Request, Reply
The Broker's binary protocol.
-
-
Field Summary
-
Fields inherited from interface com.webmethods.jms.protocol.Reply
REPLY_ERROR, REPLY_EVENT, REPLY_KEEP_ALIVE, REPLY_RESULT
-
-
Constructor Summary
Constructors Constructor Description BinaryProtocol(byte[] b, int off, int len)
BinaryProtocol(int command)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdditionalBytes(int additionalBytes)
byte[]
getBytes()
int
getError()
Get the reply error.int
getFlags()
WmMessageImpl
getMessage()
Get the message to which this reply belongs.int
getMessageCount()
Get the reply count, typically in reply to a multi-get event request.int
getNumParameters()
int
getRequestID()
Get the request ID to which this reply belongs.int
getSessionID()
Get the session ID to which this reply belongs.BrokerStream
getStream()
int
getType()
Get the reply type.int
readInt()
long
readLong()
short
readShort()
java.lang.String
readUCS()
void
setError(int error)
void
setFlags(int flags)
void
setRequestID(int requestID)
void
setSessionID(int sessionID)
java.lang.String
toString()
Returns a string representation of this object.void
writeInt(int v)
void
writeLong(long v)
void
writeShort(int v)
void
writeUCS(java.lang.String str)
-
-
-
Method Detail
-
setError
public void setError(int error)
-
getError
public int getError()
Description copied from interface:Reply
Get the reply error.
-
getMessage
public WmMessageImpl getMessage()
Description copied from interface:Reply
Get the message to which this reply belongs.- Specified by:
getMessage
in interfaceReply
- Returns:
- the message to which this reply belongs.
-
getType
public final int getType()
Description copied from interface:Reply
Get the reply type.
-
setSessionID
public final void setSessionID(int sessionID)
-
getSessionID
public final int getSessionID()
Description copied from interface:Reply
Get the session ID to which this reply belongs.- Specified by:
getSessionID
in interfaceReply
- Returns:
- the session ID to which this reply belongs
-
setRequestID
public final void setRequestID(int requestID)
-
getRequestID
public final int getRequestID()
Description copied from interface:Reply
Get the request ID to which this reply belongs.- Specified by:
getRequestID
in interfaceReply
- Returns:
- the request ID to which this reply belongs
-
getNumParameters
public final int getNumParameters()
-
setFlags
public final void setFlags(int flags)
-
getFlags
public final int getFlags()
-
writeShort
public final void writeShort(int v)
-
writeInt
public final void writeInt(int v)
-
writeLong
public final void writeLong(long v)
-
writeUCS
public final void writeUCS(java.lang.String str)
-
readShort
public final short readShort() throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
readInt
public final int readInt() throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
readLong
public final long readLong() throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
readUCS
public final java.lang.String readUCS() throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
addAdditionalBytes
public void addAdditionalBytes(int additionalBytes)
-
getStream
public BrokerStream getStream()
-
getMessageCount
public int getMessageCount()
Get the reply count, typically in reply to a multi-get event request.- Specified by:
getMessageCount
in interfaceReply
- Returns:
- the reply count
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representatio of this object
-
-