|
||||||||||
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 boolean |
disposed
|
protected long |
id
|
protected URI |
location
|
protected boolean |
marshal
|
protected LinkedBlockingQueue<Object> |
messageQueue
|
protected boolean |
network
|
protected VMTransport |
peer
|
protected boolean |
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. |
|
int |
getAsyncQueueDepth()
|
|
int |
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport. |
|
String |
getRemoteAddress()
|
|
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 |
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 |
setNetwork(boolean network)
|
|
void |
setPeer(VMTransport peer)
|
|
void |
setTransportListener(TransportListener commandListener)
Registers an inbound command listener |
|
void |
start()
|
|
void |
stop()
|
|
String |
toString()
|
|
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 disposed
protected boolean marshal
protected boolean network
protected boolean async
protected int asyncQueueDepth
protected LinkedBlockingQueue<Object> messageQueue
protected boolean started
protected final URI location
protected final long id
Constructor Detail |
---|
public VMTransport(URI location)
Method Detail |
---|
public void setPeer(VMTransport peer)
public void oneway(Object command) throws IOException
Transport
oneway
in interface Transport
IOException
public void start() throws Exception
start
in interface Service
Exception
public void stop() throws Exception
stop
in interface Service
Exception
public boolean iterate()
iterate
in interface Task
Task.iterate()
public void setTransportListener(TransportListener commandListener)
Transport
setTransportListener
in interface Transport
public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
Transport
asyncRequest
in interface Transport
responseCallback
- TODO
IOException
public Object request(Object command) throws IOException
Transport
request
in interface Transport
IOException
public Object request(Object command, int timeout) throws IOException
Transport
request
in interface Transport
IOException
public TransportListener getTransportListener()
Transport
getTransportListener
in interface Transport
public <T> T narrow(Class<T> target)
narrow
in interface Transport
public boolean isMarshal()
public void setMarshal(boolean marshal)
public boolean isNetwork()
public void setNetwork(boolean network)
public String toString()
toString
in class Object
public String getRemoteAddress()
getRemoteAddress
in interface Transport
public boolean isAsync()
public void setAsync(boolean async)
async
- the async to setpublic int getAsyncQueueDepth()
public void setAsyncQueueDepth(int asyncQueueDepth)
asyncQueueDepth
- the asyncQueueDepth to setprotected void wakeup()
public boolean isFaultTolerant()
Transport
isFaultTolerant
in interface Transport
public boolean isDisposed()
isDisposed
in interface Transport
public boolean isConnected()
isConnected
in interface Transport
public void reconnect(URI uri) throws IOException
Transport
reconnect
in interface Transport
IOException
- on failure of if not supportedpublic int getReceiveCounter()
Transport
getReceiveCounter
in interface Transport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |