|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacCommand
Represents a single SNAC command that can write a single SNAC packet
to a stream. SnacCommand
is currently the only means of sending
a SNAC command over a FLAP connection in joscar.
Field Summary | |
static short |
SNACFLAG_DEFAULT
The default value for both the first and the second flags of a SNAC command. |
Constructor Summary | |
protected |
SnacCommand(int family,
int command)
Creates a new SnacCommand with the given properties and both
flags set to SNACFLAG_DEFAULT . |
protected |
SnacCommand(int family,
int command,
short flag1,
short flag2)
Creates a new SnacCommand with the given properties. |
Method Summary | |
int |
getCommand()
Returns the SNAC command subtype of this command. |
int |
getFamily()
Returns the SNAC command family of this command. |
short |
getFlag1()
Returns the first "flag byte" of this SNAC command. |
short |
getFlag2()
Returns the second "flag byte" of this SNAC command. |
abstract void |
writeData(java.io.OutputStream out)
Writes this command's SNAC data block to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short SNACFLAG_DEFAULT
Constructor Detail |
protected SnacCommand(int family, int command)
SnacCommand
with the given properties and both
flags set to SNACFLAG_DEFAULT
. Using this constructor is equivalent
to using new
SnacCommand(family, command, SnacCommand.SNACFLAG_DEFAULT,
SnacCommand.SNACFLAG_DEFAULT)
.
family
- the SNAC command family of this commandcommand
- the SNAC command subtype of this commandprotected SnacCommand(int family, int command, short flag1, short flag2)
SnacCommand
with the given properties.
family
- the SNAC command family of this commandcommand
- the SNAC command subtype of this commandflag1
- the first flag byte of this commandflag2
- the second flag byte of this commandMethod Detail |
public final int getFamily()
public final int getCommand()
public final short getFlag1()
public final short getFlag2()
public abstract void writeData(java.io.OutputStream out) throws java.io.IOException
out
- the stream to which to write the SNAC data
java.io.IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |