StatelessRemoteProxypublic class StatelessRemoteProxy extends org.jboss.ejb3.session.BaseSessionRemoteProxy
Fields Summary |
---|
private static final long | serialVersionUID | private static final Logger | log | protected org.jboss.remoting.InvokerLocator | uri | org.jboss.aspects.asynch.AsynchProvider | provider |
Methods Summary |
---|
public java.lang.Object | getAsynchronousProxy(java.lang.Object proxy)
Class[] infs = proxy.getClass().getInterfaces();
if (!ProxyUtils.isAsynchronous(infs))
{
Class[] interfaces = ProxyUtils.addAsynchProviderInterface(infs);
AsynchMixin mixin = new AsynchMixin();
Interceptor[] newInterceptors = ProxyUtils.addAsynchProxyInterceptor(mixin, interceptors);
StatelessRemoteProxy handler = new StatelessRemoteProxy(mixin, containerId, newInterceptors, uri);
return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), interfaces, handler);
}
//I was already asynchronous
return proxy;
| private java.lang.Object | handleEjb21CallLocally(java.lang.reflect.Method method, java.lang.Object[] args)
if (method.equals(ProxyUtils.GET_HOME_HANDLE))
{
return homeHandle;
} else if (method.equals(ProxyUtils.GET_EJB_METADATA))
{
return ejbMetaData;
} else if (method.equals(ProxyUtils.GET_HANDLE))
{
return handle;
}
return null;
| public java.lang.Object | invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
if (method.getDeclaringClass() == AsynchProvider.class)
{
return provider.getFuture();
}
long hash = MethodHashing.calculateHash(method);
Object ret = ProxyUtils.handleCallLocally(hash, proxy, this, method, args);
if (ret != null)
{
return ret;
}
ret = handleEjb21CallLocally(method, args);
if (ret != null)
{
return ret;
}
MethodInvocation sri = new MethodInvocation(interceptors, hash, method, method, null);
sri.setArguments(args);
sri.setInstanceResolver(metadata);
sri.getMetaData().addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, containerId, PayloadKey.AS_IS);
sri.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.INVOKER_LOCATOR, uri, PayloadKey.AS_IS);
sri.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.SUBSYSTEM, "AOP", PayloadKey.AS_IS);
if (provider != null)
{
sri.getMetaData().addMetaData(AsynchronousInterceptor.ASYNCH, AsynchronousInterceptor.INVOKE_ASYNCH, "YES", PayloadKey.AS_IS);
}
return sri.invokeNext();
| public java.lang.String | toString()
return containerId.toString();
|
|