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 aQueueso that they can be dispatched by the HTTP GET requests from the client.
-
-
Field Summary
Fields Modifier and Type Field Description static longMAX_TIMEOUT
-
Constructor Summary
Constructors Constructor Description BlockingQueueTransport(BlockingQueue<Object> channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStart()protected voiddoStop(ServiceStopper stopper)X509Certificate[]getPeerCertificates()BlockingQueue<Object>getQueue()intgetReceiveCounter()Returns a counter which gets incremented as data is read from the transport.StringgetRemoteAddress()WireFormatgetWireFormat()Retrieves the WireFormat instance associated with this Transport instance.voidoneway(Object command)A one way asynchronous sendvoidsetPeerCertificates(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:TransportA 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:
doStartin classServiceSupport- Throws:
Exception
-
doStop
protected void doStop(ServiceStopper stopper) throws Exception
- Specified by:
doStopin classServiceSupport- Throws:
Exception
-
getReceiveCounter
public int getReceiveCounter()
Description copied from interface:TransportReturns 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:TransportSets the certificates provided by the connected peer.- Parameters:
certificates- the Certificates provided by the peer.
-
getWireFormat
public WireFormat getWireFormat()
Description copied from interface:TransportRetrieves the WireFormat instance associated with this Transport instance.- Returns:
- the WireFormat in use.
-
-