Class ProxyImpl
- java.lang.Object
-
- com.microsoft.azure.proton.transport.proxy.impl.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.microsoft.azure.proton.transport.proxy.Proxy
Proxy.ProxyState
-
-
Constructor Summary
Constructors Constructor Description ProxyImpl()Create proxy transport layer - which, after configuring using theconfigure(String, Map, ProxyHandler, Transport)API is ready for layering in qpid-proton-j transport layers, usingTransportInternal.addTransportLayer(TransportLayer)API.ProxyImpl(ProxyConfiguration configuration)Create proxy transport layer - which, after configuring using theconfigure(String, Map, ProxyHandler, Transport)API is ready for layering in qpid-proton-j transport layers, usingTransportInternal.addTransportLayer(TransportLayer)API.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(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 brokerhostwith the given proxy handler and transport.protected java.nio.ByteBuffergetInputBuffer()protected booleangetIsHandshakeInProgress()protected booleangetIsProxyConfigured()protected java.nio.ByteBuffergetOutputBuffer()protected ProxyHandlergetProxyHandler()java.util.Map<java.lang.String,java.lang.String>getProxyRequestHeaders()Gets headers for the proxy request.protected Proxy.ProxyStategetProxyState()protected org.apache.qpid.proton.engine.TransportgetUnderlyingTransport()org.apache.qpid.proton.engine.impl.TransportWrapperwrap(org.apache.qpid.proton.engine.impl.TransportInput input, org.apache.qpid.proton.engine.impl.TransportOutput output)Adds the proxy in the transport layer chain.protected voidwriteProxyRequest()
-
-
-
Constructor Detail
-
ProxyImpl
public ProxyImpl()
Create proxy transport layer - which, after configuring using theconfigure(String, Map, ProxyHandler, Transport)API is ready for layering in qpid-proton-j transport layers, usingTransportInternal.addTransportLayer(TransportLayer)API.
-
ProxyImpl
public ProxyImpl(ProxyConfiguration configuration)
Create proxy transport layer - which, after configuring using theconfigure(String, Map, ProxyHandler, Transport)API is ready for layering in qpid-proton-j transport layers, usingTransportInternal.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:
wrapin interfaceorg.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 brokerhostwith the given proxy handler and transport.
-
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()
-
getProxyState
protected Proxy.ProxyState getProxyState()
-
-