Package org.apache.activemq.transport.ws
Class WSTransportServer
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.transport.TransportServerSupport
-
- org.apache.activemq.transport.WebTransportServerSupport
-
- org.apache.activemq.transport.ws.WSTransportServer
-
- All Implemented Interfaces:
BrokerServiceAware
,Service
,TransportServer
- Direct Known Subclasses:
WSSTransportServer
public class WSTransportServer extends WebTransportServerSupport implements BrokerServiceAware
Creates a web server and registers web socket server
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.activemq.transport.WebTransportServerSupport
WebTransportServerSupport.HttpOptions, WebTransportServerSupport.JettyOptions
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.transport.WebTransportServerSupport
bindAddress, connector, host, httpOptions, jettyOptions, server, socketConnectorFactory
-
Fields inherited from class org.apache.activemq.transport.TransportServerSupport
allowLinkStealing, transportOptions
-
-
Constructor Summary
Constructors Constructor Description WSTransportServer(URI location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doStart()
protected void
doStop(ServiceStopper stopper)
InetSocketAddress
getSocketAddress()
boolean
isSslServer()
For TransportServers that provide SSL connections to their connected peers they should return true here if and only if they populate the ConnectionInfo command presented to the Broker with the peers certificate chain so that the broker knows it can use that information to authenticate the connected peer.void
setBrokerInfo(BrokerInfo brokerInfo)
Associates a broker info with the transport server so that the transport can do discovery advertisements of the broker.void
setBrokerService(BrokerService brokerService)
protected void
setConnector(org.eclipse.jetty.server.Connector connector)
void
setTransportOption(Map<String,Object> transportOptions)
-
Methods inherited from class org.apache.activemq.transport.WebTransportServerSupport
bind, configureTraceMethod, createServer, setHttpOptions, setJettyOptions
-
Methods inherited from class org.apache.activemq.transport.TransportServerSupport
getAcceptListener, getBindLocation, getConnectURI, isAllowLinkStealing, onAcceptError, setAcceptListener, setAllowLinkStealing, setBindLocation, setConnectURI
-
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
-
-
-
-
Constructor Detail
-
WSTransportServer
public WSTransportServer(URI location)
-
-
Method Detail
-
doStart
protected void doStart() throws Exception
- Specified by:
doStart
in classServiceSupport
- Throws:
Exception
-
doStop
protected void doStop(ServiceStopper stopper) throws Exception
- Specified by:
doStop
in classServiceSupport
- Throws:
Exception
-
getSocketAddress
public InetSocketAddress getSocketAddress()
- Specified by:
getSocketAddress
in interfaceTransportServer
- Returns:
- The socket address that this transport is accepting connections on or null if this does not or is not currently accepting connections on a socket.
-
setBrokerInfo
public void setBrokerInfo(BrokerInfo brokerInfo)
Description copied from interface:TransportServer
Associates a broker info with the transport server so that the transport can do discovery advertisements of the broker.- Specified by:
setBrokerInfo
in interfaceTransportServer
-
setConnector
protected void setConnector(org.eclipse.jetty.server.Connector connector)
-
setTransportOption
public void setTransportOption(Map<String,Object> transportOptions)
- Overrides:
setTransportOption
in classTransportServerSupport
-
isSslServer
public boolean isSslServer()
Description copied from interface:TransportServer
For TransportServers that provide SSL connections to their connected peers they should return true here if and only if they populate the ConnectionInfo command presented to the Broker with the peers certificate chain so that the broker knows it can use that information to authenticate the connected peer.- Specified by:
isSslServer
in interfaceTransportServer
- Returns:
- true if this transport server provides SSL level security over its connections.
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
- Specified by:
setBrokerService
in interfaceBrokerServiceAware
-
-