Class WebSocketProxyConnectionHandler
- java.lang.Object
-
- org.apache.qpid.proton.engine.BaseHandler
-
- com.microsoft.azure.eventhubs.impl.ConnectionHandler
-
- com.microsoft.azure.eventhubs.impl.WebSocketConnectionHandler
-
- com.microsoft.azure.eventhubs.impl.WebSocketProxyConnectionHandler
-
- All Implemented Interfaces:
org.apache.qpid.proton.engine.CoreHandler
,org.apache.qpid.proton.engine.Handler
public class WebSocketProxyConnectionHandler extends WebSocketConnectionHandler
-
-
Constructor Summary
Constructors Constructor Description WebSocketProxyConnectionHandler(AmqpConnection amqpConnection, String connectionId, org.apache.qpid.proton.engine.SslDomain.VerifyMode verifyMode, ProxyConfiguration proxyConfiguration)
Creates a WebSocket proxy connection handler for theamqpConnection
andproxyConfiguration
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addTransportLayers(org.apache.qpid.proton.engine.Event event, org.apache.qpid.proton.engine.impl.TransportInternal transport)
String
getRemoteHostName()
HostName to be used for socket creation.int
getRemotePort()
port used to create socket.protected void
notifyTransportErrors(org.apache.qpid.proton.engine.Event event)
static Boolean
shouldUseProxy(String hostName)
-
Methods inherited from class com.microsoft.azure.eventhubs.impl.WebSocketConnectionHandler
getMaxFrameSize, getProtocolPort
-
Methods inherited from class com.microsoft.azure.eventhubs.impl.ConnectionHandler
getAmqpConnection, onConnectionBound, onConnectionFinal, onConnectionInit, onConnectionLocalClose, onConnectionLocalOpen, onConnectionRemoteClose, onConnectionRemoteOpen, onConnectionUnbound, onTransportClosed, onTransportError
-
Methods inherited from class org.apache.qpid.proton.engine.BaseHandler
add, children, getHandler, getHandler, handle, onDelivery, onLinkFinal, onLinkFlow, onLinkInit, onLinkLocalClose, onLinkLocalDetach, onLinkLocalOpen, onLinkRemoteClose, onLinkRemoteDetach, onLinkRemoteOpen, onReactorFinal, onReactorInit, onReactorQuiesced, onSelectableError, onSelectableExpired, onSelectableFinal, onSelectableInit, onSelectableReadable, onSelectableUpdated, onSelectableWritable, onSessionFinal, onSessionInit, onSessionLocalClose, onSessionLocalOpen, onSessionRemoteClose, onSessionRemoteOpen, onTimerTask, onTransport, onTransportHeadClosed, onTransportTailClosed, onUnhandled, setHandler, setHandler
-
-
-
-
Constructor Detail
-
WebSocketProxyConnectionHandler
public WebSocketProxyConnectionHandler(AmqpConnection amqpConnection, String connectionId, org.apache.qpid.proton.engine.SslDomain.VerifyMode verifyMode, ProxyConfiguration proxyConfiguration)
Creates a WebSocket proxy connection handler for theamqpConnection
andproxyConfiguration
.- Parameters:
amqpConnection
- AMQP connection to the service.proxyConfiguration
- Required. Proxy configuration to use.- Throws:
NullPointerException
- ifproxyConfiguration
isnull
.
-
-
Method Detail
-
addTransportLayers
protected void addTransportLayers(org.apache.qpid.proton.engine.Event event, org.apache.qpid.proton.engine.impl.TransportInternal transport)
- Overrides:
addTransportLayers
in classWebSocketConnectionHandler
-
notifyTransportErrors
protected void notifyTransportErrors(org.apache.qpid.proton.engine.Event event)
- Overrides:
notifyTransportErrors
in classConnectionHandler
-
getRemoteHostName
public String getRemoteHostName()
Description copied from class:ConnectionHandler
HostName to be used for socket creation. for ex: in case of proxy server - this could be proxy ip address- Overrides:
getRemoteHostName
in classConnectionHandler
- Returns:
- host name
-
getRemotePort
public int getRemotePort()
Description copied from class:ConnectionHandler
port used to create socket. for ex: in case of talking to event hubs service via proxy - use proxy port- Overrides:
getRemotePort
in classConnectionHandler
- Returns:
- port
-
-