Search in sources :

Example 1 with NetWorkEventHandler

use of io.nuls.network.message.handler.NetWorkEventHandler in project nuls by nuls-io.

the class ConnectionManager method asynExecute.

private void asynExecute(BaseEvent networkEvent, Node node) {
    NetWorkEventHandler handler = messageHandlerFactory.getHandler(networkEvent);
    TaskManager.asynExecuteRunnable(new Runnable() {

        @Override
        public void run() {
            try {
                NetworkEventResult messageResult = handler.process(networkEvent, node);
                processMessageResult(messageResult, node);
            } catch (Exception e) {
                Log.error(e);
            }
        }
    });
}
Also used : NetWorkEventHandler(io.nuls.network.message.handler.NetWorkEventHandler) NulsException(io.nuls.core.exception.NulsException) IOException(java.io.IOException) NetworkEventResult(io.nuls.network.message.NetworkEventResult)

Aggregations

NulsException (io.nuls.core.exception.NulsException)1 NetworkEventResult (io.nuls.network.message.NetworkEventResult)1 NetWorkEventHandler (io.nuls.network.message.handler.NetWorkEventHandler)1 IOException (java.io.IOException)1