Interface InvocationRequest.Resolved

  • Enclosing interface:
    InvocationRequest

    public static interface InvocationRequest.Resolved
    The resolved content of the request.
    • Method Detail

      • getAttachments

        @NotNull
        Map<String,​Object> getAttachments()
        Get the invocation attachment map. The serializable attachments will be returned to the client.
        Returns:
        the invocation attachment map (must not be null)
      • getParameters

        @NotNull
        Object[] getParameters()
        Get the method invocation parameters.
        Returns:
        the method invocation parameters (must not be null)
      • getEJBLocator

        @NotNull
        EJBLocator<?> getEJBLocator()
        Get the Enterprise Beans locator of the request. This contains the same identifier as is returned with Request.getEJBIdentifier(), but of a type corresponding to the Enterprise Beans type, and with a resolved Enterprise Beans class and affinity.
        Returns:
        the Enterprise Beans locator (must not be null)
      • getWeakAffinity

        @NotNull
        default Affinity getWeakAffinity()
        Get the weak affinity of the request.
        Returns:
        the weak affinity of the request (must not be null)
      • hasTransaction

        boolean hasTransaction()
        Determine if the request has a transaction.
        Returns:
        true if there is a transaction context with this request
      • getTransaction

        Transaction getTransaction()
                            throws SystemException,
                                   IllegalStateException
        Get the inflowed transaction of the request. This should not be called unless it is desired to actually inflow the transaction; doing so without using the transaction will cause needless work for the transaction coordinator. To perform transaction checks, use hasTransaction() first. This method should only be called one time as it will inflow the transaction when called.

        If a transaction is present but transaction inflow has failed, a SystemException is thrown. In this case, the invocation should fail.

        It is the caller's responsibility to check the status of the returned transaction to ensure that it is in an active state; failure to do so can result in undesirable behavior.

        Returns:
        the transaction, or null if there is none for the request
        Throws:
        SystemException - if inflowing the transaction failed
        IllegalStateException - if this method is called more than one time
      • writeInvocationResult

        void writeInvocationResult​(Object result)
        Write the invocation result message.
        Parameters:
        result - the invocation result