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

io.nadron.convert.Transform 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.convert;

import io.nadron.client.communication.MessageBuffer;

/**
 * A generic interface for transforming one object to another. Implementations
 * of this interface can be used for decoding and encoding objects, maybe while
 * reading from a {@link MessageBuffer} or writing to a Netty channel.
 * 
 * @author Abraham Menacherry
 * 
 * @param 
 * @param 
 */
public interface Transform
{

	/**
	 * Convert Object of type T to type V.
	 * 
	 * @param object
	 *            The incoming object, mostly a buffer or byte array.
	 * @return Returns the converted object.
	 * @throws Exception
	 */
	V convert(T object) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy