@StampyLibrary(libraryName="stampy-core") public class StompMessageParser extends java.lang.Object
StampyMessages.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EOM
The Constant EOM.
|
| Constructor and Description |
|---|
StompMessageParser() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
convertToObject(java.lang.String body,
java.lang.String contentType)
Converts the specified string to an object based upon the specified content
type.
|
protected <MSG extends StampyMessage<?>> |
createStampyMessage(StompMessageType type,
java.util.List<java.lang.String> headers)
Creates the stampy message.
|
protected java.lang.String |
fillBody(java.lang.String body,
java.io.BufferedReader reader)
Fills the body of the STOMP message.
|
protected void |
illegalObjectCheck(java.lang.Object o)
Blank implementation; override to add any object checking logic.
|
protected boolean |
isText(java.util.List<java.lang.String> headers)
Checks if is text.
|
<MSG extends StampyMessage<?>> |
parseMessage(java.lang.String stompMessage)
Parses the message.
|
protected java.lang.String |
trimEOM(java.lang.String s)
Trims the terminating byte.
|
public static final java.lang.String EOM
public <MSG extends StampyMessage<?>> MSG parseMessage(java.lang.String stompMessage) throws UnparseableException
MSG - the generic typestompMessage - the stomp messageUnparseableException - the unparseable exceptionprotected java.lang.Object convertToObject(java.lang.String body,
java.lang.String contentType)
throws IllegalObjectException,
java.lang.ClassNotFoundException,
java.io.IOException
body - the bodycontentType - the content typeIllegalObjectException - the illegal object exceptionjava.lang.ClassNotFoundException - the class not found exceptionjava.io.IOException - Signals that an I/O exception has occurred.protected void illegalObjectCheck(java.lang.Object o)
throws IllegalObjectException
o - the oIllegalObjectException - the illegal object exceptionprotected boolean isText(java.util.List<java.lang.String> headers)
headers - the headersprotected <MSG extends StampyMessage<?>> MSG createStampyMessage(StompMessageType type, java.util.List<java.lang.String> headers) throws UnparseableException
MSG - the generic typetype - the typeheaders - the headersUnparseableException - the unparseable exceptionprotected java.lang.String fillBody(java.lang.String body,
java.io.BufferedReader reader)
throws java.io.IOException
body - the bodyreader - the readerjava.io.IOException - Signals that an I/O exception has occurred.protected java.lang.String trimEOM(java.lang.String s)
s - the s