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

com.github.lontime.extredisson.rpc.consumer.AbstractOnewayRemoteService Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy