Class OperationResponseProxy
- java.lang.Object
-
- org.jboss.as.controller.client.impl.OperationResponseProxy
-
- All Implemented Interfaces:
Closeable,AutoCloseable,OperationResponse
public class OperationResponseProxy extends Object implements OperationResponse
AnOperationResponsethat proxies back to a remote server to read any attached response streams.- Author:
- Brian Stansberry (c) 2014 Red Hat Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.client.OperationResponse
OperationResponse.Factory, OperationResponse.StreamEntry
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes anyassociated stream entries.static OperationResponseProxycreate(org.jboss.dmr.ModelNode responseNode, ManagementChannelAssociation channelAssociation, int batchId, org.jboss.dmr.ModelNode streamHeader)OperationResponse.StreamEntrygetInputStream(String uuid)Gets a stream associated with the response that has the givenuuid.List<OperationResponse.StreamEntry>getInputStreams()Gets any streams that were associated with the operation response.org.jboss.dmr.ModelNodegetResponseNode()Gets the DMR response to the operation.
-
-
-
Method Detail
-
create
public static OperationResponseProxy create(org.jboss.dmr.ModelNode responseNode, ManagementChannelAssociation channelAssociation, int batchId, org.jboss.dmr.ModelNode streamHeader)
-
getResponseNode
public org.jboss.dmr.ModelNode getResponseNode()
Description copied from interface:OperationResponseGets the DMR response to the operation.- Specified by:
getResponseNodein interfaceOperationResponse- Returns:
- the response. Will not be
null
-
getInputStreams
public List<OperationResponse.StreamEntry> getInputStreams()
Description copied from interface:OperationResponseGets any streams that were associated with the operation response. Streams will be in the order in which they were attached, but callers should exercise caution when making assumptions about that order if the operation executes across multiple servers in a managed domain. Aspects of domain execution often occur concurrently so streams may not be associated with the response in the order in which steps are listed in a multistep operation.- Specified by:
getInputStreamsin interfaceOperationResponse- Returns:
- the streams. Will not be
nullbut may be empty
-
getInputStream
public OperationResponse.StreamEntry getInputStream(String uuid)
Description copied from interface:OperationResponseGets a stream associated with the response that has the givenuuid.Server side operation step handlers that associate a stream with a response should provide the stream's uuid as the step's
resultvalue in theDMR response.- Specified by:
getInputStreamin interfaceOperationResponse- Parameters:
uuid- the uuid. Cannot benull- Returns:
- the stream entry, or
nullif no entry with the given uuid is associated
-
close
public void close() throws IOExceptionDescription copied from interface:OperationResponseCloses anyassociated stream entries.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOperationResponse- Throws:
IOException
-
-