|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSnacCommand
ConnCommand
ServiceRequest
A command sent to request an OSCAR server that supports a particular SNAC
family. Normally responded-to with a ServiceRedirect.
ServiceRedirect0x01, command 0x04| Field Summary |
| Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
| Constructor Summary | |
|
ServiceRequest(int snacFamily)
Creates a new service request command requesting the given SNAC family. |
|
ServiceRequest(int snacFamily,
MiniRoomInfo roomInfo)
Creates a new service request command requesting the given SNAC family and providing the given chat room information block. |
|
ServiceRequest(MiniRoomInfo roomInfo)
Creates a new service request for the ChatCommand.FAMILY_CHAT
family with the given chat room information block. |
protected |
ServiceRequest(SnacPacket packet)
Generates a new service request command from the given incoming SNAC packet. |
| Method Summary | |
int |
getRequestedFamily()
Returns the SNAC family requested in this service request. |
MiniRoomInfo |
getRoomInfo()
Returns the chat room information block sent with this request, or null if none was sent. |
java.lang.String |
toString()
|
void |
writeData(java.io.OutputStream out)
Writes this command's SNAC data block to the given stream. |
| Methods inherited from class SnacCommand |
getCommand, getFamily, getFlag1, getFlag2 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected ServiceRequest(SnacPacket packet)
packet - the incoming service request packetpublic ServiceRequest(int snacFamily)
snacFamily - the SNAC family to requestpublic ServiceRequest(MiniRoomInfo roomInfo)
ChatCommand.FAMILY_CHAT
family with the given chat room information block. Joining a chat room
is simply a service request. See JoinRoomCmd and RoomResponse for details.
new ServiceRequest(ChatCommand.FAMILY_CHAT, roomInfo).
roomInfo - the room information block for the room being joined
public ServiceRequest(int snacFamily,
MiniRoomInfo roomInfo)
snacFamily should normally be ChatCommand.FAMILY_CHAT if a room information block is sent, if you
really want to you can make it whatever you want.
snacFamily - the SNAC family being requestedroomInfo - a chat room information block representing the room being
joined| Method Detail |
public final int getRequestedFamily()
public final MiniRoomInfo getRoomInfo()
null if none was sent.
public void writeData(java.io.OutputStream out)
throws java.io.IOException
SnacCommand
writeData in class SnacCommandout - the stream to which to write the SNAC data
java.io.IOException - if an I/O error occurspublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||