|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.transport.DefaultTransportListener
org.apache.activemq.transport.mock.MockTransport
public class MockTransport
| Field Summary | |
|---|---|
protected Transport |
next
|
protected TransportListener |
transportListener
|
| Constructor Summary | |
|---|---|
MockTransport(Transport next)
|
|
| Method Summary | ||
|---|---|---|
FutureResponse |
asyncRequest(java.lang.Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in the future. |
|
Transport |
getNext()
|
|
int |
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport. |
|
java.lang.String |
getRemoteAddress()
|
|
TransportListener |
getTransportListener()
Returns the current transport listener |
|
void |
install(TransportFilter filter)
|
|
boolean |
isConnected()
|
|
boolean |
isDisposed()
|
|
boolean |
isFaultTolerant()
Indicates if the transport can handle faults |
|
boolean |
isReconnectSupported()
|
|
boolean |
isUpdateURIsSupported()
|
|
|
narrow(java.lang.Class<T> target)
|
|
void |
onCommand(java.lang.Object command)
called to process a command |
|
void |
oneway(java.lang.Object command)
A one way asynchronous send |
|
void |
onException(java.io.IOException error)
An unrecoverable exception has occured on the transport |
|
void |
reconnect(java.net.URI uri)
reconnect to another location |
|
java.lang.Object |
request(java.lang.Object command)
A synchronous request response |
|
java.lang.Object |
request(java.lang.Object command,
int timeout)
A synchronous request response |
|
void |
setNext(Transport next)
|
|
void |
setTransportListener(TransportListener channelListener)
Registers an inbound command listener |
|
void |
start()
|
|
void |
stop()
|
|
java.lang.String |
toString()
|
|
void |
updateURIs(boolean reblance,
java.net.URI[] uris)
Provide a list of available alternative locations |
|
| Methods inherited from class org.apache.activemq.transport.DefaultTransportListener |
|---|
transportInterupted, transportResumed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Transport next
protected TransportListener transportListener
| Constructor Detail |
|---|
public MockTransport(Transport next)
| Method Detail |
|---|
public void setTransportListener(TransportListener channelListener)
Transport
setTransportListener in interface Transport
public void start()
throws java.lang.Exception
start in interface Servicejava.io.IOException - if the next channel has not been set.
java.lang.ExceptionService.start()
public void stop()
throws java.lang.Exception
stop in interface Servicejava.lang.ExceptionService.stop()public void onCommand(java.lang.Object command)
DefaultTransportListener
onCommand in interface TransportListeneronCommand in class DefaultTransportListenerpublic Transport getNext()
public TransportListener getTransportListener()
Transport
getTransportListener in interface Transportpublic java.lang.String toString()
toString in class java.lang.Object
public void oneway(java.lang.Object command)
throws java.io.IOException
Transport
oneway in interface Transportjava.io.IOException
public FutureResponse asyncRequest(java.lang.Object command,
ResponseCallback responseCallback)
throws java.io.IOException
Transport
asyncRequest in interface TransportresponseCallback - TODO
java.io.IOException
public java.lang.Object request(java.lang.Object command)
throws java.io.IOException
Transport
request in interface Transportjava.io.IOException
public java.lang.Object request(java.lang.Object command,
int timeout)
throws java.io.IOException
Transport
request in interface Transportjava.io.IOExceptionpublic void onException(java.io.IOException error)
DefaultTransportListener
onException in interface TransportListeneronException in class DefaultTransportListenerpublic <T> T narrow(java.lang.Class<T> target)
narrow in interface Transportpublic void setNext(Transport next)
public void install(TransportFilter filter)
public java.lang.String getRemoteAddress()
getRemoteAddress in interface Transportpublic boolean isFaultTolerant()
Transport
isFaultTolerant in interface TransportTransport.isFaultTolerant()public boolean isDisposed()
isDisposed in interface Transportpublic boolean isConnected()
isConnected in interface Transport
public void reconnect(java.net.URI uri)
throws java.io.IOException
Transport
reconnect in interface Transportjava.io.IOException - on failure of if not supportedpublic int getReceiveCounter()
Transport
getReceiveCounter in interface Transportpublic boolean isReconnectSupported()
isReconnectSupported in interface Transportpublic boolean isUpdateURIsSupported()
isUpdateURIsSupported in interface Transport
public void updateURIs(boolean reblance,
java.net.URI[] uris)
throws java.io.IOException
Transport
updateURIs in interface Transportjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||