Class games.Battle.shared.comm.InfoPacket
All Packages Class Hierarchy This Package Previous Next Index
Class games.Battle.shared.comm.InfoPacket
java.lang.Object
|
+----games.Battle.shared.comm.BattlePacket
|
+----games.Battle.shared.comm.InfoPacket
- public class InfoPacket
- extends BattlePacket
InfoPacket contains a message to the user. It is used primarily for
transmitting information back and forth during the login process, and
also for transmitting chat messages.
-
Command
- Command is a command error level: some action should be taken as a
result of this information, either automatically or under the user's
directoin.
-
FatalError
- FatalError is the ultimate error level: this operation must be retried
but the socket may disappear anyway if the server really gives up.
-
Info
- Info is the informational error level: this message does not need to
be reported to the end user.
-
InfoPacket(String, byte)
- Construct a new InfoPacket to record the given information.
-
InfoPacket()
- Construct an empty InfoPacket that needs to be read from an input
stream.
-
asciiDump()
- Produces a printout for debugging purposes.
-
fromBytes(byte[])
- Converts the given array of bytes into a particular
InfoPacket.
-
isFatal()
- Returns true if this is a fatal message.
-
toBytes()
- Converts this InfoPacket to an array of bytes for
transmission.
-
toString()
- Returns a string representation, the actual text of the info message.
Info
public final static byte Info
- Info is the informational error level: this message does not need to
be reported to the end user.
Command
public final static byte Command
- Command is a command error level: some action should be taken as a
result of this information, either automatically or under the user's
directoin.
FatalError
public final static byte FatalError
- FatalError is the ultimate error level: this operation must be retried
but the socket may disappear anyway if the server really gives up.
Seen as the result of failed login attempts.
InfoPacket
public InfoPacket(String info,
byte level)
- Construct a new InfoPacket to record the given information.
- Parameters:
- info - the string to be transmitted
- level - the error level of the message
InfoPacket
public InfoPacket()
- Construct an empty InfoPacket that needs to be read from an input
stream.
toBytes
protected byte[] toBytes()
- Converts this InfoPacket to an array of bytes for
transmission.
- Overrides:
- toBytes in class BattlePacket
fromBytes
protected void fromBytes(byte data[])
- Converts the given array of bytes into a particular
InfoPacket.
- Parameters:
- data - the array of data to be converted
- Overrides:
- fromBytes in class BattlePacket
asciiDump
public void asciiDump()
- Produces a printout for debugging purposes.
toString
public String toString()
- Returns a string representation, the actual text of the info message.
- Overrides:
- toString in class Object
isFatal
public boolean isFatal()
- Returns true if this is a fatal message.
All Packages Class Hierarchy This Package Previous Next Index