Package org.jboss.ejb.server
Interface InvocationRequest.Resolved
-
- Enclosing interface:
- InvocationRequest
public static interface InvocationRequest.ResolvedThe resolved content of the request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Map<String,Object>getAttachments()Get the invocation attachment map.EJBLocator<?>getEJBLocator()Get the EJB locator of the request.Object[]getParameters()Get the method invocation parameters.TransactiongetTransaction()Get the inflowed transaction of the request.default AffinitygetWeakAffinity()Get the weak affinity of the request.booleanhasTransaction()Determine if the request has a transaction.voidwriteInvocationResult(Object result)Write the invocation result message.
-
-
-
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 EJB locator of the request. This contains the same identifier as is returned withRequest.getEJBIdentifier(), but of a type corresponding to the EJB type, and with a resolved EJB class and affinity.- Returns:
- the EJB 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:
trueif 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, usehasTransaction()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
SystemExceptionis 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
nullif there is none for the request - Throws:
SystemException- if inflowing the transaction failedIllegalStateException- if this method is called more than one time
-
writeInvocationResult
void writeInvocationResult(Object result)
Write the invocation result message.- Parameters:
result- the invocation result
-
-