Class ProxyImpl

  • All Implemented Interfaces:
    Proxy, org.apache.qpid.proton.engine.impl.TransportLayer

    public class ProxyImpl
    extends java.lang.Object
    implements Proxy, org.apache.qpid.proton.engine.impl.TransportLayer
    Implementation class that handles connecting to, the status of, and passing bytes through the web socket after the proxy is created.
    See Also:
    Proxy, ProxyHandler
    • Constructor Detail

      • ProxyImpl

        public ProxyImpl()
        Create proxy transport layer - which, after configuring using the configure(String, Map, ProxyHandler, Transport) API is ready for layering in qpid-proton-j transport layers, using TransportInternal.addTransportLayer(TransportLayer) API.
      • ProxyImpl

        public ProxyImpl​(ProxyConfiguration configuration)
        Create proxy transport layer - which, after configuring using the configure(String, Map, ProxyHandler, Transport) API is ready for layering in qpid-proton-j transport layers, using TransportInternal.addTransportLayer(TransportLayer) API.
        Parameters:
        configuration - Proxy configuration to use.
    • Method Detail

      • wrap

        public org.apache.qpid.proton.engine.impl.TransportWrapper wrap​(org.apache.qpid.proton.engine.impl.TransportInput input,
                                                                        org.apache.qpid.proton.engine.impl.TransportOutput output)
        Adds the proxy in the transport layer chain.
        Specified by:
        wrap in interface org.apache.qpid.proton.engine.impl.TransportLayer
        Parameters:
        input - The input to the transport layer.
        output - The output from the transport layer.
        Returns:
        A transport layer containing the proxy.
      • configure

        public void configure​(java.lang.String host,
                              java.util.Map<java.lang.String,​java.lang.String> headers,
                              ProxyHandler proxyHandler,
                              org.apache.qpid.proton.engine.Transport underlyingTransport)
        Configures the AMQP broker host with the given proxy handler and transport.
        Specified by:
        configure in interface Proxy
        Parameters:
        host - AMQP broker.
        headers - Additional headers to add to the proxy request.
        proxyHandler - Handler for the proxy.
        underlyingTransport - Actual transport layer.
      • getProxyRequestHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getProxyRequestHeaders()
        Gets headers for the proxy request.
        Returns:
        Headers for the proxy request.
      • getInputBuffer

        protected java.nio.ByteBuffer getInputBuffer()
      • getOutputBuffer

        protected java.nio.ByteBuffer getOutputBuffer()
      • getIsProxyConfigured

        protected boolean getIsProxyConfigured()
      • getProxyHandler

        protected ProxyHandler getProxyHandler()
      • getUnderlyingTransport

        protected org.apache.qpid.proton.engine.Transport getUnderlyingTransport()
      • writeProxyRequest

        protected void writeProxyRequest()
      • getIsHandshakeInProgress

        protected boolean getIsHandshakeInProgress()