Atavism Version 2018.1AGIS API

atavism.server.engine
Class EventServer

java.lang.Object
  extended by atavism.server.engine.EventServer

public class EventServer
extends java.lang.Object


Constructor Summary
EventServer()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventServer

public EventServer()
Method Detail

parseBytes

public Event parseBytes(AOByteBuffer buf,
                        ClientConnection con)

parseAnyBytes

public java.lang.Object parseAnyBytes(AOByteBuffer buf)
finds the correct event based on the id, parses the message and returns an event


registerEventId

public 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


getEventClass

public java.lang.Class getEventClass(int id)

getEventID

public int getEventID(java.lang.Class eventClass)
returns the id that was registered for the passed in class


getEventID

public int getEventID(java.lang.String className)


Copyright © 2018 Dragonsan Studios Sp. z o.o.