com.zusmart.base.network.support.AbstractChannelAcceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zusmart-base Show documentation
Show all versions of zusmart-base Show documentation
提供基础的工具类及方法类,Logging,Scanner,Buffer,NetWork,Future,Thread
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;
}
}