Class BlockingQueueTransport
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.transport.TransportSupport
-
- org.apache.activemq.transport.http.BlockingQueueTransport
-
public class BlockingQueueTransport extends TransportSupport
A server side HTTP based TransportChannel which processes incoming packets and adds outgoing packets onto aQueue
so that they can be dispatched by the HTTP GET requests from the client.
-
-
Field Summary
Fields Modifier and Type Field Description static long
MAX_TIMEOUT
-
Constructor Summary
Constructors Constructor Description BlockingQueueTransport(BlockingQueue<Object> channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doStart()
protected void
doStop(ServiceStopper stopper)
X509Certificate[]
getPeerCertificates()
BlockingQueue<Object>
getQueue()
int
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport.String
getRemoteAddress()
WireFormat
getWireFormat()
Retrieves the WireFormat instance associated with this Transport instance.void
oneway(Object command)
A one way asynchronous sendvoid
setPeerCertificates(X509Certificate[] certificates)
Sets the certificates provided by the connected peer.-
Methods inherited from class org.apache.activemq.transport.TransportSupport
asyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, updateURIs
-
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
-
-
-
-
Field Detail
-
MAX_TIMEOUT
public static final long MAX_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BlockingQueueTransport
public BlockingQueueTransport(BlockingQueue<Object> channel)
-
-
Method Detail
-
getQueue
public BlockingQueue<Object> getQueue()
-
oneway
public void oneway(Object command) throws IOException
Description copied from interface:Transport
A one way asynchronous send- Throws:
IOException
-
getRemoteAddress
public String getRemoteAddress()
- Returns:
- the remote address for this connection
-
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
-
getReceiveCounter
public int getReceiveCounter()
Description copied from interface:Transport
Returns a counter which gets incremented as data is read from the transport. It should only be used to determine if there is progress being made in reading the next command from the transport. The value may wrap into the negative numbers.- Returns:
- a counter which gets incremented as data is read from the transport.
-
getPeerCertificates
public X509Certificate[] getPeerCertificates()
- Returns:
- the Certificates provided by the peer, or null if not a secure channel.
-
setPeerCertificates
public void setPeerCertificates(X509Certificate[] certificates)
Description copied from interface:Transport
Sets the certificates provided by the connected peer.- Parameters:
certificates
- the Certificates provided by the peer.
-
getWireFormat
public WireFormat getWireFormat()
Description copied from interface:Transport
Retrieves the WireFormat instance associated with this Transport instance.- Returns:
- the WireFormat in use.
-
-