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

com.zusmart.base.network.support.AbstractChannelAcceptor 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.support;

import com.zusmart.base.activity.support.AbstractActivity;
import com.zusmart.base.network.ChannelAcceptor;
import com.zusmart.base.network.ChannelAdapter;
import com.zusmart.base.network.ChannelOption;
import com.zusmart.base.util.Assert;

public abstract class AbstractChannelAcceptor extends AbstractActivity implements ChannelAcceptor {

	private final ChannelOption channelOption;
	private final ChannelAdapter channelAdapter;

	protected AbstractChannelAcceptor(ChannelOption channelOption, ChannelAdapter channelAdapter) {
		Assert.isNull(channelOption, "channel option must not be null");
		Assert.isNull(channelAdapter, "channel adapter must not be null");
		this.channelOption = channelOption;
		this.channelAdapter = channelAdapter;
	}

	@Override
	protected ChannelAcceptor getActivity() {
		return this;
	}

	@Override
	public ChannelOption getChannelOption() {
		return this.channelOption;
	}

	@Override
	public ChannelAdapter getChannelAdapter() {
		return this.channelAdapter;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy