io.nadron.client.app.impl.DefaultPlayerSession 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.app.impl;
import io.nadron.client.app.Player;
import io.nadron.client.app.PlayerSession;
import io.nadron.client.event.Event;
/**
* This implementation of the {@link PlayerSession} interface is used to both
* receive and send messages to a particular player using the
* {@link Event}{@link #onEvent(Event)}.
*
* @author Abraham Menacherry
*
*/
public class DefaultPlayerSession extends DefaultSession implements PlayerSession
{
/**
* Each player session belongs to a Player. This variable holds the
* reference.
*/
final protected Player player;
protected DefaultPlayerSession(SessionBuilder sessionBuilder, Player player)
{
super(sessionBuilder);
this.player = player;
}
@Override
public Player getPlayer()
{
return player;
}
}