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

io.craft.atom.nio.AbstractNioByteChannelEvent Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
package io.craft.atom.nio;

import io.craft.atom.io.AbstractChannelEvent;
import io.craft.atom.io.Channel;
import io.craft.atom.io.ChannelEvent;
import io.craft.atom.io.ChannelEventType;
import lombok.ToString;


/**
 * @author mindwind
 * @version 1.0, Feb 26, 2013
 */
@ToString(callSuper = true, of = "channel")
abstract public class AbstractNioByteChannelEvent extends AbstractChannelEvent implements ChannelEvent {
	
	
	protected final NioByteChannel channel;
	
	
	// ~ --------------------------------------------------------------------------------------------------------------

	
	AbstractNioByteChannelEvent(ChannelEventType type, NioByteChannel channel) {
		super(type);
		if (channel == null) {
            throw new IllegalArgumentException("channel == null");
        }
		this.channel = channel;
	}
	
	
	// ~ --------------------------------------------------------------------------------------------------------------
	

	@Override
	public Channel getChannel() {
		return channel;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy