public class StatsHandler extends SNACHandler
Stats can keep track of anything. These stats keep track of what advertisements are displayed and whether or not the user clicked on any of them. I wonder how the server decides to parse the stats. It must make use of the client information send during logon.
SNACHandler
Constructor and Description |
---|
StatsHandler()
Family 0x000b.
|
Modifier and Type | Method and Description |
---|---|
void |
handleSNAC(AIMSession sess,
SNACHandler handler,
AIMFrame frame,
SNAC snac,
AIMInputStream buffer)
Handles incoming SNAC's.
|
void |
reportEvent(AIMSession sess,
AIMConnection conn,
ArrayList stats,
int type,
int id)
Report a stat event.
|
void |
reportStats(AIMSession sess,
AIMConnection conn,
ArrayList stats,
boolean wantResponse)
Subtype 0x0002 - Report our stats to the server.
|
getFamily, getVersion, setFamily, setVersion
public void reportEvent(AIMSession sess, AIMConnection conn, ArrayList stats, int type, int id)
sess
- the oscar sessionconn
- the bos connection for this sessionstats
- the stats vectortype
- the type of statid
- the stat IDpublic void reportStats(AIMSession sess, AIMConnection conn, ArrayList stats, boolean wantResponse) throws IOException
sess
- the oscar sessionconn
- the bos connection for this sessionstats
- the stats vectorwantResponse
- whether or not you want a server ack (usually false)IOException
- if an error occurspublic void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer) throws IOException
handleSNAC
in class SNACHandler
sess
- the oscar sessionhandler
- the handlerframe
- the incoming framesnac
- the incoming SNACbuffer
- the incoming bufferIOException
- if an error occurs