com.github.lontime.extredisson.rpc.consumer.AbstractOnewayRemoteService Maven / Gradle / Ivy
package com.github.lontime.extredisson.rpc.consumer;
import com.github.lontime.base.serial.GenericObjectSerializers;
import com.github.lontime.base.serial.codec.MsgCodec;
import com.github.lontime.extredisson.rpc.common.RemoteContext;
import com.twitter.serial.serializer.Serializer;
/**
* AbstractOnewayRemoteService.
* @param req
* @author lontime
* @since 1.0
*/
public abstract class AbstractOnewayRemoteService extends AbstractRemoteService {
/**
* inCodec.
* @return Serializer
*/
abstract public Serializer inCodec();
/**
* route0.
* @param context context
* @param sender sender
*/
abstract public void route0(RemoteContext context, REQ sender);
@Override
public MsgCodec codec() {
return MsgCodec.create(inCodec(), GenericObjectSerializers.INSTANCE.getObjectSerializer());
}
@Override
public Object route(RemoteContext context, REQ sender) {
route0(context, sender);
return null;
}
}