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.

Variable Index

 o 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.
 o FatalError
FatalError is the ultimate error level: this operation must be retried but the socket may disappear anyway if the server really gives up.
 o Info
Info is the informational error level: this message does not need to be reported to the end user.

Constructor Index

 o InfoPacket(String, byte)
Construct a new InfoPacket to record the given information.
 o InfoPacket()
Construct an empty InfoPacket that needs to be read from an input stream.

Method Index

 o asciiDump()
Produces a printout for debugging purposes.
 o fromBytes(byte[])
Converts the given array of bytes into a particular InfoPacket.
 o isFatal()
Returns true if this is a fatal message.
 o toBytes()
Converts this InfoPacket to an array of bytes for transmission.
 o toString()
Returns a string representation, the actual text of the info message.

Variables

 o Info
  public final static byte Info
Info is the informational error level: this message does not need to be reported to the end user.
 o 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.
 o 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.

Constructors

 o 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
 o InfoPacket
  public InfoPacket()
Construct an empty InfoPacket that needs to be read from an input stream.

Methods

 o toBytes
  protected byte[] toBytes()
Converts this InfoPacket to an array of bytes for transmission.
Overrides:
toBytes in class BattlePacket
 o 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
 o asciiDump
  public void asciiDump()
Produces a printout for debugging purposes.
 o toString
  public String toString()
Returns a string representation, the actual text of the info message.
Overrides:
toString in class Object
 o isFatal
  public boolean isFatal()
Returns true if this is a fatal message.

All Packages  Class Hierarchy  This Package  Previous  Next  Index