org.eclipse.emf.cdo.session.remote

## Class CDORemoteSessionMessage

- java.lang.Object
- - org.eclipse.emf.cdo.session.remote.CDORemoteSessionMessage

-     public final class CDORemoteSessionMessage
      extends java.lang.Object

  A message from a `remote session`.
  Since:
    3.0
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CDORemoteSessionMessage.Priority` Enumerates the possible `remote session message` priorities.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CDORemoteSessionMessage(ExtendedDataInput in)`
    `CDORemoteSessionMessage(java.lang.String type)`
    `CDORemoteSessionMessage(java.lang.String type, byte[] data)`
    `CDORemoteSessionMessage(java.lang.String type, CDORemoteSessionMessage.Priority priority)`
    `CDORemoteSessionMessage(java.lang.String type, CDORemoteSessionMessage.Priority priority, byte[] data)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getData()` Returns a copy of this message's data as a byte array.
    `ExtendedDataInputStream` | `getInputStream()` Returns a copy of this message's data as an extended input stream.
    `ExtendedDataOutputStream` | `getOutputStream()` Sets the data of this message as an extended output stream.
    `CDORemoteSessionMessage.Priority` | `getPriority()` Returns the priority of this message.
    `java.lang.String` | `getType()` Returns the type of this message that enables `message handlers` to decide whether to react on this message or not.
    `void` | `setData(byte[] data)` Sets the data of this message as a byte array.
    `java.lang.String` | `toString()`
    `void` | `write(ExtendedDataOutput out)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CDORemoteSessionMessage

          public CDORemoteSessionMessage(java.lang.String type,
                                         CDORemoteSessionMessage.Priority priority,
                                         byte[] data)

    - #### CDORemoteSessionMessage

          public CDORemoteSessionMessage(java.lang.String type,
                                         CDORemoteSessionMessage.Priority priority)

    - #### CDORemoteSessionMessage

          public CDORemoteSessionMessage(java.lang.String type,
                                         byte[] data)

    - #### CDORemoteSessionMessage

          public CDORemoteSessionMessage(java.lang.String type)

    - #### CDORemoteSessionMessage

          public CDORemoteSessionMessage(ExtendedDataInput in)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### write

          public void write(ExtendedDataOutput out)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getType

          public java.lang.String getType()

      Returns the type of this message that enables `message handlers` to decide whether to react on this message or not.
      Returns:
        the message type, never `null`.

    - #### getPriority

          public CDORemoteSessionMessage.Priority getPriority()

      Returns the priority of this message.
      Returns:
        the message priority, never `null`.

    - #### getData

          public byte[] getData()

      Returns a copy of this message's data as a byte array. Thread-safety for the message data is ensured internally.

    - #### setData

          public void setData(byte[] data)

      Sets the data of this message as a byte array. Thread-safety for the message data is ensured internally.

    - #### getInputStream

          public ExtendedDataInputStream getInputStream()

      Returns a copy of this message's data as an extended input stream. Thread-safety for the message data is ensured internally, but not for the wrapping stream!

    - #### getOutputStream

          public ExtendedDataOutputStream getOutputStream()

      Sets the data of this message as an extended output stream. Thread-safety for the message data is ensured internally, but not for the wrapping stream!

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html