|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.beepcore.beep.core.Message
Message encapsulates the BEEP MSG, RPY, ERR and NUL message types.
| Field Summary | |
static int |
MESSAGE_TYPE_ANS
BEEP message type. |
static int |
MESSAGE_TYPE_ERR
BEEP message type. |
static int |
MESSAGE_TYPE_MSG
BEEP message type. |
static int |
MESSAGE_TYPE_NUL
BEEP message type. |
static int |
MESSAGE_TYPE_RPY
BEEP message type. |
static int |
MESSAGE_TYPE_UNK
Uninitialized BEEP message. |
| Method Summary | |
int |
getAnsno()
Returns the answer number of this Message. |
Channel |
getChannel()
Returns the Channel to which this Message
belongs. |
InputDataStream |
getDataStream()
Returns InputDataStream belonging to Message. |
int |
getMessageType()
Returns the message type of this Message. |
int |
getMsgno()
Returns the message number of this Message. |
MessageStatus |
sendANS(OutputDataStream stream)
Sends a message of type ANS. |
MessageStatus |
sendERR(BEEPError error)
Sends a message of type ERR. |
MessageStatus |
sendERR(int code,
java.lang.String diagnostic)
Sends a message of type ERR. |
MessageStatus |
sendERR(int code,
java.lang.String diagnostic,
java.lang.String xmlLang)
Sends a message of type ERR. |
MessageStatus |
sendNUL()
Sends a message of type NUL. |
MessageStatus |
sendRPY(OutputDataStream stream)
Sends a message of type RPY. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MESSAGE_TYPE_UNK
public static final int MESSAGE_TYPE_MSG
public static final int MESSAGE_TYPE_RPY
public static final int MESSAGE_TYPE_ERR
public static final int MESSAGE_TYPE_ANS
public static final int MESSAGE_TYPE_NUL
| Method Detail |
public InputDataStream getDataStream()
InputDataStream belonging to Message.
InputDataStreampublic Channel getChannel()
Channel to which this Message
belongs.
Channelpublic int getMsgno()
Message.
public int getAnsno()
Message.
public int getMessageType()
Message.
public MessageStatus sendANS(OutputDataStream stream)
throws BEEPException
stream - Data to send in the form of OutputDataStream.
BEEPException - if an error is encoutered or if messageType is
not MESSAGE_TYPE_MSG.OutputDataStream,
MessageStatus,
sendNUL()
public MessageStatus sendERR(BEEPError error)
throws BEEPException
error - Error to send in the form of BEEPError.
BEEPException - if an error is encoutered or if messageType is
not MESSAGE_TYPE_MSG.BEEPError,
MessageStatus
public MessageStatus sendERR(int code,
java.lang.String diagnostic)
throws BEEPException
code - code attibute in error element.diagnostic - Message for error element.
BEEPException - if an error is encoutered or if messageType is
not MESSAGE_TYPE_MSG.MessageStatus
public MessageStatus sendERR(int code,
java.lang.String diagnostic,
java.lang.String xmlLang)
throws BEEPException
code - code attibute in error element.diagnostic - Message for error element.xmlLang - xml:lang attibute in error
element.
BEEPException - if an error is encoutered or if messageType is
not MESSAGE_TYPE_MSG.MessageStatus
public MessageStatus sendNUL()
throws BEEPException
BEEPException - if an error is encoutered or if messageType is
not MESSAGE_TYPE_MSG.MessageStatus,
sendANS(org.beepcore.beep.core.OutputDataStream)
public MessageStatus sendRPY(OutputDataStream stream)
throws BEEPException
stream - Data to send in the form of OutputDataStream.
BEEPException - if an error is encoutered or if messageType is
not MESSAGE_TYPE_MSG.OutputDataStream,
MessageStatus
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||