io.nadron.client.event.impl.StartEventHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nadclient Show documentation
Show all versions of nadclient Show documentation
This is a client library for Nadron server https://github.com/menacher/java-game-server/tree/netty4/nadron. Java clients can use this program to connect and interact with nadron server.
package io.nadron.client.event.impl;
import io.nadron.client.app.Session;
import io.nadron.client.event.Events;
import io.nadron.client.event.SessionEventHandler;
/**
* A handler to handle "START" event sent by the server. It is after the start
* event that other changes for e.g. to protocol or sending of data from client
* should be done.
*
* @author Abraham Menacherry
*
*/
public abstract class StartEventHandler implements SessionEventHandler
{
private final Session session;
public StartEventHandler(Session session)
{
this.session = session;
}
@Override
public int getEventType()
{
return Events.START;
}
@Override
public Session getSession() {
return session;
}
@Override
public void setSession(Session session) {
throw new UnsupportedOperationException("Cannot set session again");
}
}