com.hazelcast.client.impl.protocol.task
Class InvocationMessageTask<P>

java.lang.Object
  extended by com.hazelcast.client.impl.protocol.task.AbstractMessageTask<P>
      extended by com.hazelcast.client.impl.protocol.task.InvocationMessageTask<P>
All Implemented Interfaces:
SecureRequest, MessageTask, ExecutionCallback, PartitionSpecificRunnable, Runnable
Direct Known Subclasses:
CacheListenerRegistrationMessageTask, CacheManagementConfigMessageTask, ExecutorServiceSubmitToAddressMessageTask, ExecutorServiceSubmitToPartitionMessageTask

public abstract class InvocationMessageTask<P>
extends AbstractMessageTask<P>
implements ExecutionCallback


Field Summary
 
Fields inherited from class com.hazelcast.client.impl.protocol.task.AbstractMessageTask
clientEngine, clientMessage, connection, endpoint, endpointManager, logger, nodeEngine, parameters, serializationService
 
Constructor Summary
protected InvocationMessageTask(ClientMessage clientMessage, Node node, Connection connection)
           
 
Method Summary
protected  ClientMessage encodeResponse(Object response)
           
protected abstract  InvocationBuilder getInvocationBuilder(Operation op)
           
 void onFailure(Throwable t)
          Called when an execution is completed with an error.
 void onResponse(Object response)
          Called when an execution is completed successfully.
protected abstract  Operation prepareOperation()
           
protected  void processMessage()
           
 
Methods inherited from class com.hazelcast.client.impl.protocol.task.AbstractMessageTask
decodeClientMessage, getDistributedObjectName, getDistributedObjectType, getEndpoint, getMethodName, getParameters, getPartitionId, getService, getServiceName, run, sendClientMessage, sendClientMessage, sendClientMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hazelcast.client.impl.client.SecureRequest
getRequiredPermission
 

Constructor Detail

InvocationMessageTask

protected InvocationMessageTask(ClientMessage clientMessage,
                                Node node,
                                Connection connection)
Method Detail

processMessage

protected void processMessage()
Specified by:
processMessage in class AbstractMessageTask<P>

getInvocationBuilder

protected abstract InvocationBuilder getInvocationBuilder(Operation op)

prepareOperation

protected abstract Operation prepareOperation()

encodeResponse

protected ClientMessage encodeResponse(Object response)

onResponse

public void onResponse(Object response)
Description copied from interface: ExecutionCallback
Called when an execution is completed successfully.

Specified by:
onResponse in interface ExecutionCallback
Parameters:
response - the result of the successful execution

onFailure

public void onFailure(Throwable t)
Description copied from interface: ExecutionCallback
Called when an execution is completed with an error.

Specified by:
onFailure in interface ExecutionCallback
Parameters:
t - the exception that is thrown


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.