public class SourceResponseHandler
extends java.lang.Object
SourceResponseHandler have utilities for creating and preparing an outbound response to be sent
to the HTTP client.| Constructor and Description |
|---|
SourceResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canOutboundResponseHaveContentTypeHeader(org.apache.axis2.context.MessageContext msgContext) |
static org.wso2.transport.http.netty.message.HttpCarbonMessage |
createOutboundResponseMsg(org.apache.axis2.context.MessageContext msgCtx,
org.wso2.transport.http.netty.message.HttpCarbonMessage clientRequest)
Creates outbound response to be sent back to the HTTP client using the axis2 message context and
the original client request.
|
static java.lang.String |
getContentTypeForOutboundResponse(org.apache.axis2.context.MessageContext msgContext) |
static org.wso2.transport.http.netty.message.Http2PushPromise |
getPushPromise(org.apache.axis2.context.MessageContext msgCtx)
Retrieve the push promise received from the backend server.
|
static boolean |
isPassThroughMessage(org.apache.axis2.context.MessageContext msgContext)
The pass through (when message body is not built) status of the message.
|
static void |
pushPromise(org.wso2.transport.http.netty.message.Http2PushPromise http2PushPromise,
org.wso2.transport.http.netty.message.HttpCarbonMessage clientRequest)
Send the server push promise to the client.
|
static void |
pushResponse(org.apache.axis2.context.MessageContext msgCtx,
org.wso2.transport.http.netty.message.Http2PushPromise http2PushPromise,
org.wso2.transport.http.netty.message.HttpCarbonMessage outboundPushMsg,
org.wso2.transport.http.netty.message.HttpCarbonMessage clientRequest)
Send the server pushes to the client.
|
static void |
sendResponse(org.apache.axis2.context.MessageContext msgCtx,
org.wso2.transport.http.netty.message.HttpCarbonMessage inboundRequestMsg,
org.wso2.transport.http.netty.message.HttpCarbonMessage outboundResponseMsg)
Writes the response headers and the response body to the client.
|
public static org.wso2.transport.http.netty.message.HttpCarbonMessage createOutboundResponseMsg(org.apache.axis2.context.MessageContext msgCtx,
org.wso2.transport.http.netty.message.HttpCarbonMessage clientRequest)
throws org.apache.axis2.AxisFault
msgCtx - axis2 message contextclientRequest - original HTTP client requestorg.apache.axis2.AxisFault - if something goes wrong when creating the outbound responsepublic static org.wso2.transport.http.netty.message.Http2PushPromise getPushPromise(org.apache.axis2.context.MessageContext msgCtx)
throws org.apache.axis2.AxisFault
msgCtx - axis2 message contextorg.apache.axis2.AxisFault - if push promise is not availablepublic static boolean canOutboundResponseHaveContentTypeHeader(org.apache.axis2.context.MessageContext msgContext)
public static java.lang.String getContentTypeForOutboundResponse(org.apache.axis2.context.MessageContext msgContext)
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFaultpublic static boolean isPassThroughMessage(org.apache.axis2.context.MessageContext msgContext)
public static void sendResponse(org.apache.axis2.context.MessageContext msgCtx,
org.wso2.transport.http.netty.message.HttpCarbonMessage inboundRequestMsg,
org.wso2.transport.http.netty.message.HttpCarbonMessage outboundResponseMsg)
throws org.apache.axis2.AxisFault
msgCtx - axis2 message contextinboundRequestMsg - inbound request carbon messageoutboundResponseMsg - outbound response carbon messageorg.apache.axis2.AxisFault - if something goes wrong when sending out the responsepublic static void pushPromise(org.wso2.transport.http.netty.message.Http2PushPromise http2PushPromise,
org.wso2.transport.http.netty.message.HttpCarbonMessage clientRequest)
throws org.apache.axis2.AxisFault
http2PushPromise - Http2PushPromiseclientRequest - HttpCarbonMessageorg.apache.axis2.AxisFault - if error occurred while pushing responses.public static void pushResponse(org.apache.axis2.context.MessageContext msgCtx,
org.wso2.transport.http.netty.message.Http2PushPromise http2PushPromise,
org.wso2.transport.http.netty.message.HttpCarbonMessage outboundPushMsg,
org.wso2.transport.http.netty.message.HttpCarbonMessage clientRequest)
throws org.apache.axis2.AxisFault
msgCtx - axis2 message contexthttp2PushPromise - Http2PushPromiseoutboundPushMsg - HttpCarbonMessageclientRequest - HttpCarbonMessageorg.apache.axis2.AxisFault - if error occurred while pushing responses.Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.