Message (BEEP Core API)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.beepcore.beep.core
Class Message

    java.lang.Object
      |
      +--org.beepcore.beep.core.Message

public class Message
extends java.lang.Object

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

### MESSAGE_TYPE_UNK

    public static final int MESSAGE_TYPE_UNK

  Uninitialized BEEP message.

  See Also:
    Constant Field Values

### MESSAGE_TYPE_MSG

    public static final int MESSAGE_TYPE_MSG

  BEEP message type.

  See Also:
    Constant Field Values

### MESSAGE_TYPE_RPY

    public static final int MESSAGE_TYPE_RPY

  BEEP message type.

  See Also:
    Constant Field Values

### MESSAGE_TYPE_ERR

    public static final int MESSAGE_TYPE_ERR

  BEEP message type.

  See Also:
    Constant Field Values

### MESSAGE_TYPE_ANS

    public static final int MESSAGE_TYPE_ANS

  BEEP message type.

  See Also:
    Constant Field Values

### MESSAGE_TYPE_NUL

    public static final int MESSAGE_TYPE_NUL

  BEEP message type.

  See Also:
    Constant Field Values

Method Detail

### getDataStream

    public InputDataStream getDataStream()

  Returns `InputDataStream` belonging to `Message`.

  See Also:
    `InputDataStream`

### getChannel

    public Channel getChannel()

  Returns the `Channel` to which this `Message` belongs.

  See Also:
    `Channel`

### getMsgno

    public int getMsgno()

  Returns the message number of this `Message`.

### getAnsno

    public int getAnsno()

  Returns the answer number of this `Message`.

### getMessageType

    public int getMessageType()

  Returns the message type of this `Message`.

### sendANS

    public MessageStatus sendANS(OutputDataStream stream)
                          throws BEEPException

  Sends a message of type ANS.

  Parameters:
    `stream` - Data to send in the form of `OutputDataStream`.
  Returns:
    MessageStatus
  Throws:
    `BEEPException` - if an error is encoutered or if messageType is not MESSAGE_TYPE_MSG.
  See Also:
    `OutputDataStream`, `MessageStatus`, `sendNUL()`

### sendERR

    public MessageStatus sendERR(BEEPError error)
                          throws BEEPException

  Sends a message of type ERR.

  Parameters:
    `error` - Error to send in the form of `BEEPError`.
  Returns:
    MessageStatus
  Throws:
    `BEEPException` - if an error is encoutered or if messageType is not MESSAGE_TYPE_MSG.
  See Also:
    `BEEPError`, `MessageStatus`

### sendERR

    public MessageStatus sendERR(int code,
                                 java.lang.String diagnostic)
                          throws BEEPException

  Sends a message of type ERR.

  Parameters:
    `code` - `code` attibute in `error` element.
    `diagnostic` - Message for `error` element.
  Returns:
    MessageStatus
  Throws:
    `BEEPException` - if an error is encoutered or if messageType is not MESSAGE_TYPE_MSG.
  See Also:
    `MessageStatus`

### sendERR

    public MessageStatus sendERR(int code,
                                 java.lang.String diagnostic,
                                 java.lang.String xmlLang)
                          throws BEEPException

  Sends a message of type ERR.

  Parameters:
    `code` - `code` attibute in `error` element.
    `diagnostic` - Message for `error` element.
    `xmlLang` - `xml:lang` attibute in `error` element.
  Returns:
    MessageStatus
  Throws:
    `BEEPException` - if an error is encoutered or if messageType is not MESSAGE_TYPE_MSG.
  See Also:
    `MessageStatus`

### sendNUL

    public MessageStatus sendNUL()
                          throws BEEPException

  Sends a message of type NUL.

  Returns:
    MessageStatus
  Throws:
    `BEEPException` - if an error is encoutered or if messageType is not MESSAGE_TYPE_MSG.
  See Also:
    `MessageStatus`, `sendANS(org.beepcore.beep.core.OutputDataStream)`

### sendRPY

    public MessageStatus sendRPY(OutputDataStream stream)
                          throws BEEPException

  Sends a message of type RPY.

  Parameters:
    `stream` - Data to send in the form of `OutputDataStream`.
  Returns:
    MessageStatus
  Throws:
    `BEEPException` - if an error is encoutered or if messageType is not MESSAGE_TYPE_MSG.
  See Also:
    `OutputDataStream`, `MessageStatus`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.