view rep/channel/REPSocketChannel.java @ 123:5b1a0574b406 add-simulator

*** empty log message ***
author pin
date Wed, 27 Aug 2008 17:21:25 +0900
parents
children a4e2bceb9713
line wrap: on
line source

package rep.channel;

import java.io.IOException;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.nio.channels.spi.SelectorProvider;

public class REPSocketChannel<P> extends SelectableChannel{

	private SocketChannel sc;

	public REPSocketChannel(SocketChannel channel) {
		sc = channel;
	}

	@Override
	public Object blockingLock() {
		return sc.blockingLock();
	}

	@Override
	public SelectableChannel configureBlocking(boolean block) throws IOException {
		return sc.configureBlocking(block);
	}

	@Override
	public boolean isBlocking() {
		return sc.isBlocking();
	}

	@Override
	public boolean isRegistered() {
		return sc.isRegistered();
	}

	@Override
	public SelectionKey keyFor(Selector sel) {
		return sc.keyFor(sel);
	}

	@Override
	public SelectorProvider provider() {
		return sc.provider();
	}

	@Override
	public SelectionKey register(Selector sel, int ops, Object att) throws ClosedChannelException {
		return sc.register(sel, ops, att);
	}

	@Override
	public int validOps() {
		return sc.validOps();
	}

	@Override
	protected void implCloseChannel() throws IOException {
		sc.close();
	}
	
	

}