jfreerails.network
Class LogOnResponse

java.lang.Object
  extended by jfreerails.network.LogOnResponse
All Implemented Interfaces:
java.io.Serializable, FreerailsSerializable

public class LogOnResponse
extends java.lang.Object
implements FreerailsSerializable

Stores the result of a request to log onto the server.

Author:
Luke
See Also:
Serialized Form

Field Summary
private  java.lang.String message
           
private  int playerNumber
           
private static long serialVersionUID
           
private  boolean successful
           
 
Constructor Summary
private LogOnResponse(boolean success, int i, java.lang.String s)
           
 
Method Summary
static LogOnResponse accepted(int playerNumber)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getMessage()
           
 int getPlayerID()
           
 int hashCode()
           
 boolean isSuccessful()
           
static LogOnResponse rejected(java.lang.String reason)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

successful

private final boolean successful

playerNumber

private final int playerNumber

message

private final java.lang.String message
Constructor Detail

LogOnResponse

private LogOnResponse(boolean success,
                      int i,
                      java.lang.String s)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

accepted

public static LogOnResponse accepted(int playerNumber)

rejected

public static LogOnResponse rejected(java.lang.String reason)

getPlayerID

public int getPlayerID()

getMessage

public java.lang.String getMessage()

isSuccessful

public boolean isSuccessful()