|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSnacFamilyInfoFactory
Provides a means of generating a list of SnacFamilyInfo values
that are compatible with the default implementations of
SnacCommands in joscar. Note that this only provides a default
set of SnacFamilyInfos and you are free to send whatever list
of SnacFamilyInfos you please in ClientVersionsCmds and ClientReadyCmds; however, with different SNAC
family versions often comes changes to the protocol, changes that the default
SnacCommand implementations provided by joscar may not be able
to handle.
| Method Summary | |
static SnacFamilyInfo[] |
getDefaultFamilyInfos(int[] supportedFamilies)
Returns a list of SNAC family version information objects given a list of supported families. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static SnacFamilyInfo[] getDefaultFamilyInfos(int[] supportedFamilies)
SnacFamilyInfo is returned, in the order that the supported
family list was given.
void handleServerReadyCmd(ServerReadyCmd serverReadyCmd) {
int[] families = serverReadyCmd.getSnacFamilies();
SnacFamilyInfo[] familyInfos = SnacFamilyInfoFactory.getDefaultFamilyInfos(
families);
ClientVersionsCmd out = new ClientVersionsCmd(familyInfos);
// ... send command ...
}
supportedFamilies - a list of supported families for which family
information objects should be returned
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||