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

## gecco.communication.messages
Class Message

    java.lang.Object
      gecco.communication.messages.Message

Direct Known Subclasses:
  AbortAllClientActionsMessage, AbortGameMessage, AcceptConnectionMessage, ActionBlockedMessage, ActionCompletedMessage, ActionFailedMessage, ActionMessage, AvailableRolesMessage, CoffeeBreakMessage, DisconnectMessage, GameOverMessage, GetAvailableRolesMessage, GetMapMessage, InvalidMessage, JoinAsRoleMessage, MapMessage, MapPointInvisibleMessage, MapPointsInvisibleMessage, MapUpdateMessage, MapUpdatesMessage, PingMessage, PingReplyMessage, RejectConnectionMessage, StartGameMessage, TimeUpdateMessage, UnitDeletedMessage, UnitDestroyedMessage, UnitMessageMessage, UnitPositionUpdateMessage, UnitPropertyUpdateMessage, UnitVisibleMessage

public abstract class Message
extends Object

This is the superclass to all messages.

Author:
  Karl Hasselström

Constructor Summary
`Message()`

Method Summary
`static Message` | `read(DataInput in)` This factory method reads a message id from the input stream and calls the `read()` factory method of the corresponding subclass, which is responsible for reading the actual data.
`abstract void` | `write(DataOutput out)` This method should write the message to the given `DataOutput`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Message

    public Message()

Method Detail

### write

    public abstract void write(DataOutput out)
                        throws IOException

  This method should write the message to the given `DataOutput`.

  Parameters:
    `out` - The output stream.
  Throws:
    `IOException`

### read

    public static Message read(DataInput in)
                        throws IOException

  This factory method reads a message id from the input stream and calls the `read()` factory method of the corresponding subclass, which is responsible for reading the actual data.

  Parameters:
    `in` - The input stream.
  Returns:
    An instance of `Message`.
  Throws:
    `IOException`

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