public class WarpContextImpl extends Object implements WarpContext
| Constructor and Description |
|---|
WarpContextImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGroup(WarpGroup group)
Registers group to be inspected
|
void |
addUnmatchedRequest(Request request)
Records that given request was not matched by any observer.
|
Collection<WarpGroup> |
getAllGroups()
Returns all registered groups
|
int |
getExpectedRequestCount()
Return the number of requests expected in all groups of this context
|
Exception |
getFirstException()
Returns first exception observed during Warp execution.
|
org.jboss.arquillian.test.spi.TestResult |
getFirstNonSuccessfulResult()
Returns first observed non-successful result.
|
WarpGroup |
getGroup(Object identifier)
Returns the request group based on its identifier under which it was registered using
WarpContext.addGroup(WarpGroup). |
Collection<RequestObserverChainManager> |
getObserverChainManagers()
Get all registered services for
RequestObserverChainManager. |
WarpResult |
getResult()
Exports response status as
WarpResult to be available to user. |
SynchronizationPoint |
getSynchronization()
Returns the point of synchronization of current Warp execution.
|
List<Request> |
getUnmatchedRequests()
Return the list of requests which weren't matched by any observer.
|
void |
initialize(org.jboss.arquillian.core.spi.ServiceLoader serviceLoader)
Initializes Warp context by available services.
|
void |
pushException(Exception exception)
Pushes exception observer during Warp execution to context.
|
void |
pushResponsePayload(ResponsePayload payload)
Pushes
ResponsePayload to context. |
public void addGroup(WarpGroup group)
WarpContextaddGroup in interface WarpContextpublic Collection<WarpGroup> getAllGroups()
WarpContextgetAllGroups in interface WarpContextpublic WarpGroup getGroup(Object identifier)
WarpContextWarpContext.addGroup(WarpGroup).getGroup in interface WarpContextpublic Collection<RequestObserverChainManager> getObserverChainManagers()
WarpContextRequestObserverChainManager.getObserverChainManagers in interface WarpContextpublic org.jboss.arquillian.test.spi.TestResult getFirstNonSuccessfulResult()
WarpContextgetFirstNonSuccessfulResult in interface WarpContextpublic void pushResponsePayload(ResponsePayload payload)
WarpContext
Pushes ResponsePayload to context.
Context should ensure propagating ResponsePayload to associated WarpGroup based on the generated serial
identifier (RequestPayload.getSerialId()).
pushResponsePayload in interface WarpContextpublic void pushException(Exception exception)
WarpContextpushException in interface WarpContextpublic Exception getFirstException()
WarpContextgetFirstException in interface WarpContextpublic SynchronizationPoint getSynchronization()
WarpContextgetSynchronization in interface WarpContextpublic WarpResult getResult()
WarpContextWarpResult to be available to user.getResult in interface WarpContextpublic void initialize(org.jboss.arquillian.core.spi.ServiceLoader serviceLoader)
WarpContextInitializes Warp context by available services.
Note: WarpContext is used in another thread, that's why it can't access injected ServiceLoader directly.
initialize in interface WarpContextpublic int getExpectedRequestCount()
WarpContextgetExpectedRequestCount in interface WarpContextpublic void addUnmatchedRequest(Request request)
WarpContextFor debugging purposes.
addUnmatchedRequest in interface WarpContextpublic List<Request> getUnmatchedRequests()
WarpContextgetUnmatchedRequests in interface WarpContextCopyright © 2019 JBoss by Red Hat. All rights reserved.