org.neo4j.kernel.ha
Class DelegateInvocationHandler<T>

java.lang.Object
  extended by org.neo4j.kernel.ha.DelegateInvocationHandler<T>
Type Parameters:
T -
All Implemented Interfaces:
InvocationHandler

public class DelegateInvocationHandler<T>
extends Object
implements InvocationHandler

InvocationHandler for dynamic proxies that delegate calls to a given backing implementation. This is mostly used to present a single object to others, while being able to switch implementation at runtime.


Constructor Summary
DelegateInvocationHandler()
           
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
           
 void setDelegate(T delegate)
           
static
<T> T
snapshot(T proxiedInstance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateInvocationHandler

public DelegateInvocationHandler()
Method Detail

setDelegate

public void setDelegate(T delegate)

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

snapshot

public static <T> T snapshot(T proxiedInstance)


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.