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

com.zusmart.base.network.ChannelContext Maven / Gradle / Ivy

Go to download

提供基础的工具类及方法类,Logging,Scanner,Buffer,NetWork,Future,Thread

There is a newer version: 1.0.6
Show newest version
package com.zusmart.base.network;

import java.io.IOException;
import java.nio.channels.Selector;

import com.zusmart.base.network.handler.ChannelContextHandlerChain;
import com.zusmart.base.network.message.Message;
import com.zusmart.base.network.message.MessageFuture;
import com.zusmart.base.toolkit.NetAddress;

public interface ChannelContext {

	public long getRegistTime();

	public long getActiveTime();

	public long getReaderActiveTime();

	public long getWriterActiveTime();

	public long getReaderDataTotal();

	public long getWriterDataTotal();

	public long getReaderDataCount();

	public long getWriterDataCount();

	public boolean isOpen();

	public boolean isServerSide();

	public boolean isClientSide();

	public String getContextCode();

	public NetAddress getServerAddress();

	public NetAddress getClientAddress();

	public ChannelContextFuture close();

	public ChannelContextFuture flush();

	public MessageFuture write(Message message);

	public MessageFuture writeAndFlush(Message message);

	public ChannelContextHandlerChain getChannelContextHandlerChain();
	
	///////////////////////////////////////////////////////////////////////////
	
	public void doRegister(Selector selector)throws IOException;
	
	public void doListener(int events)throws IOException;
	
	public void deRegister();
	
	public void doException(Throwable cause);
	
	public void doTimeout();
	
	public void doReadable()throws IOException;
	
	public void doWritable()throws IOException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy