Methods Summary |
---|
public java.util.Map | getContextData()
if (metadata == null) {
metadata = ClientInterceptorUtil.getClientMetadataMap(wrapped);
if (metadata == null)
{
metadata = new HashMap();
}
}
return metadata;
|
public java.lang.reflect.Method | getMethod()
return wrapped.getMethod();
|
public java.lang.Object[] | getParameters()
return wrapped.getArguments();
|
public java.lang.Object | getTarget()
return wrapped.getTargetObject();
|
public java.lang.Object | proceed()
if (currentInterceptor < interceptorInfos.length)
{
int oldInterceptor = currentInterceptor;
int oldMethod = currentMethod;
try
{
int curr = currentInterceptor;
int currMethod = currentMethod++;
InterceptorInfo info = interceptorInfos[curr];
if (currMethod == info.getAroundInvokes().length)
{
curr = ++currentInterceptor;
currentMethod = 0;
currMethod = currentMethod++;
info = (curr < interceptorInfos.length) ? interceptorInfos[curr] : null;
}
if (info != null)
{
try
{
return info.getAroundInvokes()[currMethod].invoke(instances[curr], this);
}
catch (InvocationTargetException e)
{
if (e.getTargetException() instanceof Exception)
{
throw ((Exception) e.getCause());
}
else
{
throw new RuntimeException(e.getCause());
}
}
}
}
finally
{
// so that interceptors like clustering can reinvoke down the chain
currentInterceptor = oldInterceptor;
currentMethod = oldMethod;
}
}
if (beanAroundInvokes != null && currentBeanMethod < beanAroundInvokes.length)
{
try
{
int curr = currentBeanMethod++;
return beanAroundInvokes[curr].invoke(getTarget(), this);
}
catch (InvocationTargetException e)
{
if (e.getTargetException() instanceof Exception)
{
throw ((Exception) e.getCause());
}
else
{
throw new RuntimeException(e.getCause());
}
}
finally
{
currentBeanMethod--;;
}
}
try
{
return wrapped.invokeNext();
}
catch (Exception e)
{
throw e;
}
catch (Throwable t)
{
throw new RuntimeException(t);
}
|
public void | setParameters(java.lang.Object[] params)
wrapped.setArguments(params);
|