org.kuali.rice.ksb.messaging.serviceproxies
Class AsynchronousServiceCallProxy

java.lang.Object
  extended by org.kuali.rice.core.api.util.reflect.BaseInvocationHandler
      extended by org.kuali.rice.ksb.messaging.serviceproxies.AsynchronousServiceCallProxy
All Implemented Interfaces:
InvocationHandler, TargetedInvocationHandler
Direct Known Subclasses:
SynchronousServiceCallProxy

public class AsynchronousServiceCallProxy
extends BaseInvocationHandler
implements TargetedInvocationHandler

Standard default proxy used to call services asynchronously. Persists the method call to the db so call is never lost and only sent when transaction is committed.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
protected AsynchronousServiceCallProxy(List<Endpoint> endpoints, AsynchronousCallback callback, Serializable context, String value1, String value2)
           
 
Method Summary
static Object createInstance(List<Endpoint> endpoints, AsynchronousCallback callback, Serializable context, String value1, String value2)
           
protected  void executeMessage(PersistedMessageBO message)
           
 AsynchronousCallback getCallback()
           
 Object getTarget()
          Returns the List of asynchronous services which will be invoked by calls to this proxy.
protected  Object invokeInternal(Object proxy, Method method, Object[] arguments)
           
protected  String proxyToString(Object proxy)
           
protected  PersistedMessageBO saveMessage(PersistedMessageBO message)
           
 void setCallback(AsynchronousCallback callback)
           
 
Methods inherited from class org.kuali.rice.core.api.util.reflect.BaseInvocationHandler
invoke, proxyEquals, proxyHashCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.reflect.InvocationHandler
invoke
 

Constructor Detail

AsynchronousServiceCallProxy

protected AsynchronousServiceCallProxy(List<Endpoint> endpoints,
                                       AsynchronousCallback callback,
                                       Serializable context,
                                       String value1,
                                       String value2)
Method Detail

createInstance

public static Object createInstance(List<Endpoint> endpoints,
                                    AsynchronousCallback callback,
                                    Serializable context,
                                    String value1,
                                    String value2)

invokeInternal

protected Object invokeInternal(Object proxy,
                                Method method,
                                Object[] arguments)
                         throws Throwable
Specified by:
invokeInternal in class BaseInvocationHandler
Throws:
Throwable

proxyToString

protected String proxyToString(Object proxy)
Overrides:
proxyToString in class BaseInvocationHandler

saveMessage

protected PersistedMessageBO saveMessage(PersistedMessageBO message)

executeMessage

protected void executeMessage(PersistedMessageBO message)
                       throws Exception
Throws:
Exception

getTarget

public Object getTarget()
Returns the List of asynchronous services which will be invoked by calls to this proxy. This is a List because, in the case of Topics, there can be more than one service invoked.

Specified by:
getTarget in interface TargetedInvocationHandler
Returns:
the target object

getCallback

public AsynchronousCallback getCallback()

setCallback

public void setCallback(AsynchronousCallback callback)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.