com.joyzl.network.odbs.ODBSServerHandler Maven / Gradle / Ivy
The newest version!
/*-
* www.joyzl.net
* 中翌智联(重庆)科技有限公司
* Copyright © JOY-Links Company. All rights reserved.
*/
package com.joyzl.network.odbs;
import com.joyzl.network.chain.ChainChannel;
import com.joyzl.odbs.ODBS;
/**
* @author ZhangXi
* @date 2020年12月13日
*/
public abstract class ODBSServerHandler extends ODBSServerCoder {
public ODBSServerHandler(ODBS o) {
super(o);
}
@Override
public void connected(ChainChannel chain) throws Exception {
chain.receive();
}
@Override
public void received(ChainChannel chain, M message) throws Exception {
chain.receive();
}
@Override
public void sent(ChainChannel chain, M message) throws Exception {
((ODBSSlave) chain).sent(message);
}
@Override
public void error(ChainChannel chain, Throwable e) {
chain.close();
}
}