|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.transport.vm.VMTransport
public class VMTransport
A Transport implementation that uses direct method invocations.
| Field Summary | |
|---|---|
protected boolean |
async
|
protected int |
asyncQueueDepth
|
protected AtomicBoolean |
disposed
|
protected long |
id
|
protected URI |
location
|
protected boolean |
marshal
|
protected boolean |
network
|
protected VMTransport |
peer
|
protected AtomicBoolean |
started
|
protected TransportListener |
transportListener
|
| Constructor Summary | |
|---|---|
VMTransport(URI location)
|
|
| Method Summary | ||
|---|---|---|
FutureResponse |
asyncRequest(Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in the future. |
|
void |
dispatch(VMTransport transport,
BlockingQueue<Object> pending,
Object command)
|
|
void |
doDispatch(VMTransport transport,
TransportListener transportListener,
Object command)
|
|
int |
getAsyncQueueDepth()
|
|
LinkedBlockingQueue<Object> |
getMessageQueue()
|
|
int |
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport. |
|
String |
getRemoteAddress()
|
|
protected TaskRunner |
getTaskRunner()
|
|
TransportListener |
getTransportListener()
Returns the current transport listener |
|
boolean |
isAsync()
|
|
boolean |
isConnected()
|
|
boolean |
isDisposed()
|
|
boolean |
isFaultTolerant()
Indicates if the transport can handle faults |
|
boolean |
isMarshal()
|
|
boolean |
isNetwork()
|
|
boolean |
isReconnectSupported()
|
|
boolean |
isUpdateURIsSupported()
|
|
boolean |
iterate()
|
|
|
narrow(Class<T> target)
|
|
void |
oneway(Object command)
A one way asynchronous send |
|
void |
reconnect(URI uri)
reconnect to another location |
|
Object |
request(Object command)
A synchronous request response |
|
Object |
request(Object command,
int timeout)
A synchronous request response |
|
void |
setAsync(boolean async)
|
|
void |
setAsyncQueueDepth(int asyncQueueDepth)
|
|
void |
setMarshal(boolean marshal)
|
|
void |
setMessageQueue(LinkedBlockingQueue<Object> asyncQueue)
|
|
void |
setNetwork(boolean network)
|
|
void |
setPeer(VMTransport peer)
|
|
void |
setTransportListener(TransportListener commandListener)
Registers an inbound command listener |
|
void |
start()
|
|
void |
stop()
|
|
String |
toString()
|
|
void |
updateURIs(boolean reblance,
URI[] uris)
Provide a list of available alternative locations |
|
protected void |
wakeup()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected VMTransport peer
protected TransportListener transportListener
protected boolean marshal
protected boolean network
protected boolean async
protected int asyncQueueDepth
protected final URI location
protected final long id
protected final AtomicBoolean started
protected final AtomicBoolean disposed
| Constructor Detail |
|---|
public VMTransport(URI location)
| Method Detail |
|---|
public void setPeer(VMTransport peer)
public void oneway(Object command)
throws IOException
Transport
oneway in interface TransportIOException
public void dispatch(VMTransport transport,
BlockingQueue<Object> pending,
Object command)
public void doDispatch(VMTransport transport,
TransportListener transportListener,
Object command)
public void start()
throws Exception
start in interface ServiceException
public void stop()
throws Exception
stop in interface ServiceExceptionprotected void wakeup()
public boolean iterate()
iterate in interface TaskTask.iterate()public void setTransportListener(TransportListener commandListener)
Transport
setTransportListener in interface Transportpublic void setMessageQueue(LinkedBlockingQueue<Object> asyncQueue)
public LinkedBlockingQueue<Object> getMessageQueue()
throws TransportDisposedIOException
TransportDisposedIOException
protected TaskRunner getTaskRunner()
throws TransportDisposedIOException
TransportDisposedIOException
public FutureResponse asyncRequest(Object command,
ResponseCallback responseCallback)
throws IOException
Transport
asyncRequest in interface TransportresponseCallback - TODO
IOException
public Object request(Object command)
throws IOException
Transport
request in interface TransportIOException
public Object request(Object command,
int timeout)
throws IOException
Transport
request in interface TransportIOExceptionpublic TransportListener getTransportListener()
Transport
getTransportListener in interface Transportpublic <T> T narrow(Class<T> target)
narrow in interface Transportpublic boolean isMarshal()
public void setMarshal(boolean marshal)
public boolean isNetwork()
public void setNetwork(boolean network)
public String toString()
toString in class Objectpublic String getRemoteAddress()
getRemoteAddress in interface Transportpublic boolean isAsync()
public void setAsync(boolean async)
async - the async to setpublic int getAsyncQueueDepth()
public void setAsyncQueueDepth(int asyncQueueDepth)
asyncQueueDepth - the asyncQueueDepth to setpublic boolean isFaultTolerant()
Transport
isFaultTolerant in interface Transportpublic boolean isDisposed()
isDisposed in interface Transportpublic boolean isConnected()
isConnected in interface Transport
public void reconnect(URI uri)
throws IOException
Transport
reconnect in interface TransportIOException - on failure of if not supportedpublic boolean isReconnectSupported()
isReconnectSupported in interface Transportpublic boolean isUpdateURIsSupported()
isUpdateURIsSupported in interface Transport
public void updateURIs(boolean reblance,
URI[] uris)
throws IOException
Transport
updateURIs in interface TransportIOExceptionpublic int getReceiveCounter()
Transport
getReceiveCounter in interface Transport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||