net.kano.joscar.flap
Class FlapCommand

java.lang.Object
  extended byFlapCommand
Direct Known Subclasses:
CloseFlapCmd, FlapErrorCmd, LoginFlapCmd, SnacFlapCmd

public abstract class FlapCommand
extends java.lang.Object

Provides an interface to a FLAP command that contains FLAP data on a specific channel of a FLAP connection.


Constructor Summary
protected FlapCommand(int channel)
          Creates a FLAP command on the given FLAP channel.
 
Method Summary
 int getChannel()
          Returns the channel on which this FLAP command resides.
abstract  void writeData(java.io.OutputStream out)
          Writes this command's FLAP data to the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlapCommand

protected FlapCommand(int channel)
Creates a FLAP command on the given FLAP channel.

Parameters:
channel - the FLAP channel associated with this command
Method Detail

getChannel

public final int getChannel()
Returns the channel on which this FLAP command resides.

Returns:
this FLAP command's FLAP channel

writeData

public abstract void writeData(java.io.OutputStream out)
                        throws java.io.IOException
Writes this command's FLAP data to the given stream.

Parameters:
out - the stream to which the FLAP data should be written
Throws:
java.io.IOException - if an I/O error occurs