站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

InvocationHandler - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.wsrp.consumer
Class InvocationHandler

java.lang.Object
  extended byorg.jboss.portal.wsrp.consumer.InvocationHandler
Direct Known Subclasses:
ActionHandler, RenderHandler

public abstract class InvocationHandler
extends java.lang.Object

Since:
2.4 (May 31, 2006)
Version:
$Revision: 5440 $
Author:
Chris Laprun

Field Summary
protected  WSRPConsumerImpl consumer
           
private static int DO_NOT_RETRY
          Value indicating that we should not try further (unrecoverable error) for getMarkup and processBlockingInteraction
protected  org.jboss.logging.Logger log
           
private static int MAXIMUM_RETRY_NUMBER
          Maximum number of tries before giving up.
 
Constructor Summary
InvocationHandler(WSRPConsumerImpl consumer)
           
 
Method Summary
private  ErrorResponse dealWithError(java.lang.Exception error, PortletInvocation invocation, RuntimeContext runtimeContext)
          Deals with common error conditions.
protected abstract  RuntimeContext getRuntimeContextFrom(java.lang.Object request)
           
(package private)  PortletInvocationResponse handle(PortletInvocation invocation)
           
protected abstract  java.lang.Object performRequest(java.lang.Object request)
           
protected  java.lang.Object performRequest(java.lang.Object request, PortletInvocation invocation)
           
protected abstract  java.lang.Object prepareRequest(RequestPrecursor requestPrecursor, PortletInvocation invocation)
           
protected abstract  PortletInvocationResponse processResponse(java.lang.Object response, PortletInvocation invocation, RequestPrecursor requestPrecursor)
           
protected  ErrorResponse unwrapWSRPError(ErrorResponse errorResponse)
           
protected abstract  void updateRegistrationContext(java.lang.Object request)
           
protected abstract  void updateUserContext(java.lang.Object request, UserContext userContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consumer

protected WSRPConsumerImpl consumer

log

protected org.jboss.logging.Logger log

DO_NOT_RETRY

private static final int DO_NOT_RETRY
Value indicating that we should not try further (unrecoverable error) for getMarkup and processBlockingInteraction

See Also:
Constant Field Values

MAXIMUM_RETRY_NUMBER

private static final int MAXIMUM_RETRY_NUMBER
Maximum number of tries before giving up.

See Also:
Constant Field Values
Constructor Detail

InvocationHandler

public InvocationHandler(WSRPConsumerImpl consumer)
Method Detail

handle

PortletInvocationResponse handle(PortletInvocation invocation)
                           throws PortletInvokerException
Throws:
PortletInvokerException

performRequest

protected java.lang.Object performRequest(java.lang.Object request,
                                          PortletInvocation invocation)
                                   throws ServiceDescriptionUnavailableException
Throws:
ServiceDescriptionUnavailableException

dealWithError

private ErrorResponse dealWithError(java.lang.Exception error,
                                    PortletInvocation invocation,
                                    RuntimeContext runtimeContext)
                             throws ServiceDescriptionUnavailableException
Deals with common error conditions.

Parameters:
error - the error that is to be dealt with
invocation - the invocation that caused the error to occur
runtimeContext - the current WSRP RuntimeContext
Returns:
an ErrorResponse if the error couldn't be dealt with or null if the error was correctly handled
Throws:
ServiceDescriptionUnavailableException

unwrapWSRPError

protected ErrorResponse unwrapWSRPError(ErrorResponse errorResponse)

updateUserContext

protected abstract void updateUserContext(java.lang.Object request,
                                          UserContext userContext)

updateRegistrationContext

protected abstract void updateRegistrationContext(java.lang.Object request)

getRuntimeContextFrom

protected abstract RuntimeContext getRuntimeContextFrom(java.lang.Object request)

performRequest

protected abstract java.lang.Object performRequest(java.lang.Object request)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

prepareRequest

protected abstract java.lang.Object prepareRequest(RequestPrecursor requestPrecursor,
                                                   PortletInvocation invocation)

processResponse

protected abstract PortletInvocationResponse processResponse(java.lang.Object response,
                                                             PortletInvocation invocation,
                                                             RequestPrecursor requestPrecursor)