JSettlers v1.0.6 API
Built ${date}

soc.message
Class SOCMessage

java.lang.Object
  extended bysoc.message.SOCMessage
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
SOCAcceptOffer, SOCAdminPing, SOCAdminReset, SOCBankTrade, SOCBCastTextMsg, SOCBoardLayout, SOCBuildRequest, SOCBuyCardRequest, SOCCancelBuildRequest, SOCChangeFace, SOCChannels, SOCChoosePlayer, SOCChoosePlayerRequest, SOCClearOffer, SOCClearTradeMsg, SOCCreateAccount, SOCDeleteChannel, SOCDeleteGame, SOCDevCard, SOCDevCardCount, SOCDiceResult, SOCDiscard, SOCDiscardRequest, SOCDiscoveryPick, SOCEndTurn, SOCFirstPlayer, SOCGameMembers, SOCGames, SOCGameState, SOCGameStats, SOCGameTextMsg, SOCImARobot, SOCJoin, SOCJoinAuth, SOCJoinGame, SOCJoinGameAuth, SOCJoinGameRequest, SOCLargestArmy, SOCLastSettlement, SOCLeave, SOCLeaveAll, SOCLeaveGame, SOCLongestRoad, SOCMakeOffer, SOCMembers, SOCMonopolyPick, SOCMoveRobber, SOCNewChannel, SOCNewGame, SOCPlayDevCardRequest, SOCPlayerElement, SOCPotentialSettlements, SOCPutPiece, SOCRejectConnection, SOCRejectOffer, SOCResourceCount, SOCRobotDismiss, SOCRollDice, SOCRollDiceRequest, SOCServerPing, SOCSetPlayedDevCard, SOCSetSeatLock, SOCSetTurn, SOCSetupDone, SOCSitDown, SOCStartGame, SOCStatusMessage, SOCTextMsg, SOCTurn, SOCUpdateRobotParams

public abstract class SOCMessage
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Messages used for chatting on a channel

Author:
Robert S Thomas
See Also:
Serialized Form

Field Summary
static int ACCEPTOFFER
           
static int ADMINPING
           
static int ADMINRESET
           
static int BANKTRADE
           
static int BCASTTEXTMSG
           
static int BOARDLAYOUT
           
static int BUILDREQUEST
           
static int BUYCARDREQUEST
           
static int CANCELBUILDREQUEST
           
static int CHANGEFACE
           
static int CHANNELS
           
static int CHOOSEPLAYER
           
static int CHOOSEPLAYERREQUEST
           
static int CLEAROFFER
           
static int CLEARTRADEMSG
           
static int CREATEACCOUNT
           
static int DELETECHANNEL
           
static int DELETEGAME
           
static int DEVCARD
           
static int DEVCARDCOUNT
           
static int DICERESULT
           
static int DISCARD
           
static int DISCARDREQUEST
           
static int DISCOVERYPICK
           
static int ENDTURN
           
static int FIRSTPLAYER
           
static int GAMEMEMBERS
           
static int GAMES
           
static int GAMESTATE
           
static int GAMESTATS
           
static int GAMETEXTMSG
           
static int IMAROBOT
           
static int JOIN
           
static int JOINAUTH
           
static int JOINGAME
           
static int JOINGAMEAUTH
           
static int JOINGAMEREQUEST
           
static int LARGESTARMY
           
static int LASTSETTLEMENT
           
static int LEAVE
           
static int LEAVEALL
           
static int LEAVEGAME
           
static int LONGESTROAD
           
static int MAKEOFFER
           
static int MEMBERS
           
protected  int messageType
          An ID identifying the type of message
static int MONOPOLYPICK
           
static int MOVEROBBER
           
static int NEWCHANNEL
           
static int NEWGAME
           
static int NULLMESSAGE
          message type IDs
static int PLAYDEVCARDREQUEST
           
static int PLAYERELEMENT
           
static int POTENTIALSETTLEMENTS
           
static int PUTPIECE
           
static int REJECTCONNECTION
           
static int REJECTOFFER
           
static int RESOURCECOUNT
           
static int ROBOTDISMISS
           
static int ROLLDICE
           
static int ROLLDICEREQUEST
           
protected static java.lang.String sep
          token seperators
protected static java.lang.String sep2
           
static int SERVERPING
           
static int SETPLAYEDDEVCARD
           
static int SETSEATLOCK
           
static int SETTURN
           
static int SETUPDONE
           
static int SITDOWN
           
static int STARTGAME
           
static int STATUSMESSAGE
           
static int TEXTMSG
           
static int TURN
           
static int UPDATEROBOTPARAMS
           
 
Constructor Summary
SOCMessage()
           
 
Method Summary
 int getType()
           
abstract  java.lang.String toCmd()
          Converts the contents of this message into a String that can be transferred by a client or server.
static SOCMessage toMsg(java.lang.String s)
          Convert a string into a SOCMessage The string is in the form of " sep sep "
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULLMESSAGE

public static final int NULLMESSAGE
message type IDs

See Also:
Constant Field Values

NEWCHANNEL

public static final int NEWCHANNEL
See Also:
Constant Field Values

MEMBERS

public static final int MEMBERS
See Also:
Constant Field Values

CHANNELS

public static final int CHANNELS
See Also:
Constant Field Values

JOIN

public static final int JOIN
See Also:
Constant Field Values

TEXTMSG

public static final int TEXTMSG
See Also:
Constant Field Values

LEAVE

public static final int LEAVE
See Also:
Constant Field Values

DELETECHANNEL

public static final int DELETECHANNEL
See Also:
Constant Field Values

LEAVEALL

public static final int LEAVEALL
See Also:
Constant Field Values

PUTPIECE

public static final int PUTPIECE
See Also:
Constant Field Values

GAMETEXTMSG

public static final int GAMETEXTMSG
See Also:
Constant Field Values

LEAVEGAME

public static final int LEAVEGAME
See Also:
Constant Field Values

SITDOWN

public static final int SITDOWN
See Also:
Constant Field Values

JOINGAME

public static final int JOINGAME
See Also:
Constant Field Values

BOARDLAYOUT

public static final int BOARDLAYOUT
See Also:
Constant Field Values

DELETEGAME

public static final int DELETEGAME
See Also:
Constant Field Values

NEWGAME

public static final int NEWGAME
See Also:
Constant Field Values

GAMEMEMBERS

public static final int GAMEMEMBERS
See Also:
Constant Field Values

STARTGAME

public static final int STARTGAME
See Also:
Constant Field Values

GAMES

public static final int GAMES
See Also:
Constant Field Values

JOINAUTH

public static final int JOINAUTH
See Also:
Constant Field Values

JOINGAMEAUTH

public static final int JOINGAMEAUTH
See Also:
Constant Field Values

IMAROBOT

public static final int IMAROBOT
See Also:
Constant Field Values

JOINGAMEREQUEST

public static final int JOINGAMEREQUEST
See Also:
Constant Field Values

PLAYERELEMENT

public static final int PLAYERELEMENT
See Also:
Constant Field Values

GAMESTATE

public static final int GAMESTATE
See Also:
Constant Field Values

TURN

public static final int TURN
See Also:
Constant Field Values

SETUPDONE

public static final int SETUPDONE
See Also:
Constant Field Values

DICERESULT

public static final int DICERESULT
See Also:
Constant Field Values

DISCARDREQUEST

public static final int DISCARDREQUEST
See Also:
Constant Field Values

ROLLDICEREQUEST

public static final int ROLLDICEREQUEST
See Also:
Constant Field Values

ROLLDICE

public static final int ROLLDICE
See Also:
Constant Field Values

ENDTURN

public static final int ENDTURN
See Also:
Constant Field Values

DISCARD

public static final int DISCARD
See Also:
Constant Field Values

MOVEROBBER

public static final int MOVEROBBER
See Also:
Constant Field Values

CHOOSEPLAYER

public static final int CHOOSEPLAYER
See Also:
Constant Field Values

CHOOSEPLAYERREQUEST

public static final int CHOOSEPLAYERREQUEST
See Also:
Constant Field Values

REJECTOFFER

public static final int REJECTOFFER
See Also:
Constant Field Values

CLEAROFFER

public static final int CLEAROFFER
See Also:
Constant Field Values

ACCEPTOFFER

public static final int ACCEPTOFFER
See Also:
Constant Field Values

BANKTRADE

public static final int BANKTRADE
See Also:
Constant Field Values

MAKEOFFER

public static final int MAKEOFFER
See Also:
Constant Field Values

CLEARTRADEMSG

public static final int CLEARTRADEMSG
See Also:
Constant Field Values

BUILDREQUEST

public static final int BUILDREQUEST
See Also:
Constant Field Values

CANCELBUILDREQUEST

public static final int CANCELBUILDREQUEST
See Also:
Constant Field Values

BUYCARDREQUEST

public static final int BUYCARDREQUEST
See Also:
Constant Field Values

DEVCARD

public static final int DEVCARD
See Also:
Constant Field Values

DEVCARDCOUNT

public static final int DEVCARDCOUNT
See Also:
Constant Field Values

SETPLAYEDDEVCARD

public static final int SETPLAYEDDEVCARD
See Also:
Constant Field Values

PLAYDEVCARDREQUEST

public static final int PLAYDEVCARDREQUEST
See Also:
Constant Field Values

DISCOVERYPICK

public static final int DISCOVERYPICK
See Also:
Constant Field Values

MONOPOLYPICK

public static final int MONOPOLYPICK
See Also:
Constant Field Values

FIRSTPLAYER

public static final int FIRSTPLAYER
See Also:
Constant Field Values

SETTURN

public static final int SETTURN
See Also:
Constant Field Values

ROBOTDISMISS

public static final int ROBOTDISMISS
See Also:
Constant Field Values

POTENTIALSETTLEMENTS

public static final int POTENTIALSETTLEMENTS
See Also:
Constant Field Values

CHANGEFACE

public static final int CHANGEFACE
See Also:
Constant Field Values

REJECTCONNECTION

public static final int REJECTCONNECTION
See Also:
Constant Field Values

LASTSETTLEMENT

public static final int LASTSETTLEMENT
See Also:
Constant Field Values

GAMESTATS

public static final int GAMESTATS
See Also:
Constant Field Values

BCASTTEXTMSG

public static final int BCASTTEXTMSG
See Also:
Constant Field Values

RESOURCECOUNT

public static final int RESOURCECOUNT
See Also:
Constant Field Values

ADMINPING

public static final int ADMINPING
See Also:
Constant Field Values

ADMINRESET

public static final int ADMINRESET
See Also:
Constant Field Values

LONGESTROAD

public static final int LONGESTROAD
See Also:
Constant Field Values

LARGESTARMY

public static final int LARGESTARMY
See Also:
Constant Field Values

SETSEATLOCK

public static final int SETSEATLOCK
See Also:
Constant Field Values

STATUSMESSAGE

public static final int STATUSMESSAGE
See Also:
Constant Field Values

CREATEACCOUNT

public static final int CREATEACCOUNT
See Also:
Constant Field Values

UPDATEROBOTPARAMS

public static final int UPDATEROBOTPARAMS
See Also:
Constant Field Values

SERVERPING

public static final int SERVERPING
See Also:
Constant Field Values

sep

protected static final java.lang.String sep
token seperators

See Also:
Constant Field Values

sep2

protected static java.lang.String sep2

messageType

protected int messageType
An ID identifying the type of message

Constructor Detail

SOCMessage

public SOCMessage()
Method Detail

getType

public int getType()
Returns:
the message type

toCmd

public abstract java.lang.String toCmd()
Converts the contents of this message into a String that can be transferred by a client or server.


toMsg

public static SOCMessage toMsg(java.lang.String s)
Convert a string into a SOCMessage The string is in the form of " sep sep "

Parameters:
s - String to convert
Returns:
converted String to a SOCMessage, or null if the string is garbled

JSettlers v1.0.6 API
Built ${date}