IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.cs.invoker.base
Interface BeanInvoker

All Known Subinterfaces:
BeanInvokerForJavaRequest, BeanInvokerForStrutsAction
All Known Implementing Classes:
BeanInvokerImpl, EventManagerServerInvoker

public interface BeanInvoker

EJB methods are strongly typed and each EJB has it own corresponding access information. In order to provide a generic way to access EJB, invocation architecture is required. This is where the Bean Invoker Pattern fills the hole.

Since invocation logic should be hidden from developers, the Bean Invoker pattern is a good solution. Logic for creating Bean Invoker and bean invocation logic are encapsulated within Bean Invoker. Developers may invoke EJB through a Bean Invoker with a generic interface. The BeanInvoker provides the generic interface for RequestHandler and Automaton. The basic function includes parseRequestData, invoke and processRespondData.

The default behavior of the basic Bean Invoker will be carried in the following steps:

  • Request Handler use the different parseRequestData APIs to parse the request data according to the different connectors.
  • Execute EJB accessing code (end-user should override this)
  • Return the EJB invocation result
  • Request Handler maps the result to context or String data according to the different connectors.

  • Field Summary
    static java.lang.String COPYRIGHT
               
     
    Method Summary
     void clear()
              Clear all relevant data.
     java.lang.Object createBeanInvokerProxy()
              Create a bean proxy.
     java.lang.Object getBeanInvokerProxy()
              Get the Invoker Proxy from Invoker
     java.lang.String getRequestID()
              Get requestID corresponsed with Invoker
     java.util.ResourceBundle getResource()
              Get Resource informaton
     BTTSystemData getSystemData()
              Get the SystemData from Invoker
     java.lang.Object invoke()
              It's the generic entry point launched by Request Handler.
     java.lang.Object processRespondData(java.lang.Object ejbResult)
              Handler the EJB result, and transfer to client side.
     void setBeanInvokerProxy(java.lang.Object ejbObject)
              Set the Invoker Proxy to Invoker
     void setRequestID(java.lang.String requestID)
              Set requestID corresponsed with Invoker
     void setResource(java.util.ResourceBundle resource)
              Set Resource information to Bean Invoker.
     void setSystemData(BTTSystemData systemData)
              Set the SystemData to Invoker
     

    Field Detail

    COPYRIGHT

    public static final java.lang.String COPYRIGHT
    See Also:
    Constant Field Values
    Method Detail

    invoke

    public java.lang.Object invoke()
                            throws DSEInvalidRequestException
    It's the generic entry point launched by Request Handler. This invoker method will follow the execution sequence rules to accomplish the EJB invocation.

    Returns:
    Object invoker instance
    Throws:
    DSEInvalidRequestException

    setResource

    public void setResource(java.util.ResourceBundle resource)
                     throws DSEObjectNotFoundException
    Set Resource information to Bean Invoker.

    Parameters:
    resource - Invoker Resource Register file
    Throws:
    DSEObjectNotFoundException

    getResource

    public java.util.ResourceBundle getResource()
    Get Resource informaton

    Returns:
    ResourceBundle Invoker Resource Register file

    clear

    public void clear()
    Clear all relevant data.


    createBeanInvokerProxy

    public java.lang.Object createBeanInvokerProxy()
                                            throws DSEInvalidRequestException
    Create a bean proxy. The implementation is provided in the subclass This method is called when the BeanInvokerFactory cannot find a bean proxy from the pool

    Returns:
    Object EJBObject instance
    Throws:
    DSEInvalidRequestException

    setBeanInvokerProxy

    public void setBeanInvokerProxy(java.lang.Object ejbObject)
    Set the Invoker Proxy to Invoker

    Parameters:
    ejbObject - EJB Object

    getBeanInvokerProxy

    public java.lang.Object getBeanInvokerProxy()
    Get the Invoker Proxy from Invoker

    Returns:
    Object EJBObject instance

    setSystemData

    public void setSystemData(BTTSystemData systemData)
    Set the SystemData to Invoker

    Parameters:
    systemData - BTT System Data

    getSystemData

    public BTTSystemData getSystemData()
    Get the SystemData from Invoker

    Returns:
    BTTSystemData

    processRespondData

    public java.lang.Object processRespondData(java.lang.Object ejbResult)
                                        throws DSEInvalidRequestException
    Handler the EJB result, and transfer to client side. different result object for different Connectors:
  • Html Connector - Dummy Conetxt: End-user should map the EJB result to dummy context manually in this method
  • non-Html Connector - String: Code Generatation Tool will override this method. And generate formatting APIs according to the formatting definition.
  • Automaton - Conetxt: End-user should map the EJB result to Context manually in this method.
  • Parameters:
    ejbResult - EJB execute result
    Returns:
    Object
    Throws:
    DSEInvalidRequestException

    getRequestID

    public java.lang.String getRequestID()
    Get requestID corresponsed with Invoker

    Returns:
    String requestID

    setRequestID

    public void setRequestID(java.lang.String requestID)
    Set requestID corresponsed with Invoker

    Parameters:
    requestID -

    IBM Branch Transformation Toolkit Javadoc

    (c) Copyright IBM Corporation 1998, 2005