public class EventServer
extends java.lang.Object
Constructor and Description |
---|
EventServer() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getEventClass(int id) |
int |
getEventID(java.lang.Class eventClass)
returns the id that was registered for the passed in class
|
int |
getEventID(java.lang.String className) |
java.lang.Object |
parseAnyBytes(AOByteBuffer buf)
finds the correct event based on the id, parses the message
and returns an event
|
Event |
parseBytes(AOByteBuffer buf,
ClientConnection con) |
void |
registerEventId(int id,
java.lang.String className)
registers an event id number with the event class
so that when the server gets an event over the network
it knows which event class to dispatch it to for
de-serialization
|
public Event parseBytes(AOByteBuffer buf, ClientConnection con)
public java.lang.Object parseAnyBytes(AOByteBuffer buf)
public void registerEventId(int id, java.lang.String className)
public java.lang.Class getEventClass(int id)
public int getEventID(java.lang.Class eventClass)
public int getEventID(java.lang.String className)