com.hazelcast.client.spi
Class ClientProxy

java.lang.Object
  extended by com.hazelcast.client.spi.ClientProxy
All Implemented Interfaces:
DistributedObject
Direct Known Subclasses:
AbstractClientCollectionProxy, ClientAtomicLongProxy, ClientAtomicReferenceProxy, ClientCacheDistributedObject, ClientConditionProxy, ClientCountDownLatchProxy, ClientExecutorServiceProxy, ClientIdGeneratorProxy, ClientLockProxy, ClientMapProxy, ClientMapReduceProxy, ClientMultiMapProxy, ClientQueueProxy, ClientReplicatedMapProxy, ClientSemaphoreProxy, ClientTopicProxy

public abstract class ClientProxy
extends Object
implements DistributedObject


Constructor Summary
protected ClientProxy(String serviceName, String objectName)
           
 
Method Summary
 void destroy()
           
 boolean equals(Object o)
           
protected  ClientContext getContext()
           
 Object getId()
          Deprecated. 
 String getName()
           
 String getPartitionKey()
           
 String getServiceName()
           
 int hashCode()
           
protected
<T> T
invoke(ClientRequest req)
           
protected
<T> T
invoke(ClientRequest req, Address address)
           
protected
<T> T
invoke(ClientRequest req, Object key)
           
protected
<T> T
invokeInterruptibly(ClientRequest req, Object key)
           
protected  String listen(ClientRequest registrationRequest, EventHandler handler)
           
protected  String listen(ClientRequest registrationRequest, Object partitionKey, EventHandler handler)
           
protected  void onDestroy()
          Called before proxy is destroyed.
protected  void onInitialize()
          Called when proxy is created.
protected  void onShutdown()
          Called before client shutdown.
protected  void setContext(ClientContext context)
           
protected  boolean stopListening(BaseClientRemoveListenerRequest request, String registrationId)
           
protected  void throwExceptionIfNull(Object o)
           
protected  Data toData(Object o)
           
protected
<T> T
toObject(Object data)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientProxy

protected ClientProxy(String serviceName,
                      String objectName)
Method Detail

listen

protected final String listen(ClientRequest registrationRequest,
                              Object partitionKey,
                              EventHandler handler)

listen

protected final String listen(ClientRequest registrationRequest,
                              EventHandler handler)

stopListening

protected final boolean stopListening(BaseClientRemoveListenerRequest request,
                                      String registrationId)

getContext

protected final ClientContext getContext()

setContext

protected final void setContext(ClientContext context)

getId

@Deprecated
public final Object getId()
Deprecated. 

Specified by:
getId in interface DistributedObject

getName

public final String getName()
Specified by:
getName in interface DistributedObject

getPartitionKey

public String getPartitionKey()
Specified by:
getPartitionKey in interface DistributedObject

getServiceName

public final String getServiceName()
Specified by:
getServiceName in interface DistributedObject

destroy

public final void destroy()
Specified by:
destroy in interface DistributedObject

onInitialize

protected void onInitialize()
Called when proxy is created. Overriding implementations can add initialization specific logic into this method like registering a listener, creating a cleanup task etc.


onDestroy

protected void onDestroy()
Called before proxy is destroyed. Overriding implementations should clean/release resources created during initialization.


onShutdown

protected void onShutdown()
Called before client shutdown. Overriding implementations can add shutdown specific logic here.


invoke

protected <T> T invoke(ClientRequest req,
                       Object key)

invokeInterruptibly

protected <T> T invokeInterruptibly(ClientRequest req,
                                    Object key)
                         throws InterruptedException
Throws:
InterruptedException

invoke

protected <T> T invoke(ClientRequest req)

invoke

protected <T> T invoke(ClientRequest req,
                       Address address)

toData

protected Data toData(Object o)

toObject

protected <T> T toObject(Object data)

throwExceptionIfNull

protected void throwExceptionIfNull(Object o)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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