Package com.webmethods.jms.protocol
Class AsciiProtocolHandler.AsciiReply
- java.lang.Object
-
- com.webmethods.jms.protocol.AsciiProtocolHandler.AsciiReply
-
- All Implemented Interfaces:
Reply
- Enclosing class:
- AsciiProtocolHandler
protected class AsciiProtocolHandler.AsciiReply extends java.lang.Object implements Reply
This class represents a Broker reply to a client request.
-
-
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 AsciiReply(byte[] reply, int off, int len)
Constructs a Broker reply from the bytes read from the Broker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getError()
Returns the reply's error number if this reply is an error.int
getEventDeliveryCount()
Returns the delivery count if the reply is an event.long
getEventSequenceNumber()
Returns the sequence number if the reply is an event.WmMessageImpl
getMessage()
Get the reply's message.int
getMessageCount()
Get the reply count, typically in reply to a multi-get event request.int[]
getMessageSubscriptionIDs()
Returns the reply's message subscription IDs if this reply is a message.java.lang.String
getReplyString()
Returns the reply's text.int
getRequestID()
Get the request ID to which this reply belongs.int
getSessionID()
Get the session ID to which this reply belongs.int
getSize()
Get the size of any additional data, typically the size of the event.int
getType()
Get the reply type.void
setData(byte[] data, int off, int len)
Sets additional data belonging to a Broker reply.java.lang.String
toString()
Returns a string representation of this object.
-
-
-
Constructor Detail
-
AsciiReply
public AsciiReply(byte[] reply, int off, int len) throws javax.jms.JMSException
Constructs a Broker reply from the bytes read from the Broker.- Parameters:
reply
- the Broker reply bytesoff
- the start of the Broker replylen
- the length of the Broker reply- Throws:
javax.jms.JMSException
- if the reply could not be parsed
-
-
Method Detail
-
getType
public int getType()
Get the reply type.
-
setData
public void setData(byte[] data, int off, int len)
Sets additional data belonging to a Broker reply. This is typically event data.- Parameters:
data
- additional data belonging to a Broker replyoff
- the start of the additional datalen
- the length of the additional data
-
getSize
public int getSize()
Get the size of any additional data, typically the size of the event.- Returns:
- the size of any additional data
-
getMessage
public WmMessageImpl getMessage()
Get the reply's message.- Specified by:
getMessage
in interfaceReply
- Returns:
- the reply's message
-
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
-
getMessageSubscriptionIDs
public int[] getMessageSubscriptionIDs()
Returns the reply's message subscription IDs if this reply is a message.- Returns:
- the reply's message subscription IDs
-
getSessionID
public int getSessionID()
Get the session ID to which this reply belongs.- Specified by:
getSessionID
in interfaceReply
- Returns:
- the session ID to which this reply belongs
-
getRequestID
public int getRequestID()
Get the request ID to which this reply belongs.- Specified by:
getRequestID
in interfaceReply
- Returns:
- the request ID to which this reply belongs
-
getError
public int getError()
Returns the reply's error number if this reply is an error.
-
getReplyString
public java.lang.String getReplyString()
Returns the reply's text.- Returns:
- the reply's text
-
getEventSequenceNumber
public long getEventSequenceNumber()
Returns the sequence number if the reply is an event.- Returns:
- the sequence number if the reply is an event
-
getEventDeliveryCount
public int getEventDeliveryCount()
Returns the delivery count if the reply is an event.- Returns:
- the delivery count if the reply is an event
-
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
-
-