com.alipay.remoting
Interface CommandHandler

All Known Implementing Classes:
RpcCommandHandler

public interface CommandHandler

Command handler.


Method Summary
 ExecutorService getDefaultExecutor()
          Get default executor for the handler.
 void handleCommand(RemotingContext ctx, Object msg)
          Handle the command.
 void registerDefaultExecutor(ExecutorService executor)
          Register default executor for the handler.
 void registerProcessor(CommandCode cmd, RemotingProcessor<?> processor)
          Register processor for command with specified code.
 

Method Detail

handleCommand

void handleCommand(RemotingContext ctx,
                   Object msg)
                   throws Exception
Handle the command.

Parameters:
ctx -
msg -
Throws:
Exception

registerProcessor

void registerProcessor(CommandCode cmd,
                       RemotingProcessor<?> processor)
Register processor for command with specified code.

Parameters:
cmd -
processor -

registerDefaultExecutor

void registerDefaultExecutor(ExecutorService executor)
Register default executor for the handler.

Parameters:
executor -

getDefaultExecutor

ExecutorService getDefaultExecutor()
Get default executor for the handler.



Copyright © 2018. All rights reserved.