All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.nadron.client.event.impl.DefaultEvent Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 0.5
Show newest version
package io.nadron.client.event.impl;

import io.nadron.client.event.Event;

import java.io.Serializable;


/**
 * Instances of this class are used to hold events that come in from remote
 * nadron server, for communicating between sessions and also for transmitting
 * messages to the remote nadron server from client.
 * 
 * @author Abraham Menacherry
 * 
 */
public class DefaultEvent implements Event, Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -1114679476675012101L;

	protected int type;
	protected Object source;
	protected long timeStamp;

	@Override
	public int getType()
	{
		return type;
	}

	@Override
	public Object getSource()
	{
		return source;
	}

	@Override
	public long getTimeStamp()
	{
		return timeStamp;
	}

	@Override
	public void setType(int type)
	{
		this.type = type;
	}

	@Override
	public void setSource(Object source)
	{
		this.source = source;
	}

	@Override
	public void setTimeStamp(long timeStamp)
	{
		this.timeStamp = timeStamp;

	}

	@Override
	public String toString()
	{
		return "Event [type=" + type + ", source=" + source + ", timeStamp="
				+ timeStamp + "]";
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy