public static void handleDomainOperationResponseStreams ( final OperationContext context , final ModelNode responseNode , final List < OperationResponse . StreamEntry > streams ) { if ( responseNode . hasDefined ( RESPONSE_HEADERS ) ) { ModelNode responseHeaders = responseNode . get ( RESPONSE_HEADERS ) ; // Strip out any stream header as the header created by this process is what counts responseHeaders . remove ( ATTACHED_STREAMS ) ; if ( responseHeaders . asInt ( ) == 0 ) { responseNode . remove ( RESPONSE_HEADERS ) ; } } for ( OperationResponse . StreamEntry streamEntry : streams ) { context . attachResultStream ( streamEntry . getUUID ( ) , streamEntry . getMimeType ( ) , streamEntry . getStream ( ) ) ; } }
Deal with streams attached to an operation response from a proxied domain process .