C# Class Apache.NMS.ActiveMQ.Transport.Mock.MockTransport

Transport used for testing, mimics the behaviour of a normal Transport and allows messages to be sent and received
Inheritance: ITransport
Show file Open project: ThorTech/apache-nms Class Usage Examples

Public Methods

Method Description
AsyncRequest ( Command command ) : FutureResponse
Dispose ( ) : void
InjectCommand ( Command command ) : void

Injects a Command into the Transports inbound message queue, the Commands in the inbound Queue are dispatched to the registered CommnadHandler instance for processing, this simulates receiving a message from an external source, e.g. receiving a new message from the Broker.

MockTransport ( Uri uri )
Narrow ( Type type ) : Object
Oneway ( Command command ) : void
Request ( Command command ) : Response
Request ( Command command, System.TimeSpan timeout ) : Response
Start ( ) : void
Stop ( ) : void
UpdateURIs ( bool rebalance, Uri updatedURIs ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Method Details

AsyncRequest() public method

public AsyncRequest ( Command command ) : FutureResponse
command Command
return FutureResponse

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

InjectCommand() public method

Injects a Command into the Transports inbound message queue, the Commands in the inbound Queue are dispatched to the registered CommnadHandler instance for processing, this simulates receiving a message from an external source, e.g. receiving a new message from the Broker.
public InjectCommand ( Command command ) : void
command Command /// A ///
return void

MockTransport() public method

public MockTransport ( Uri uri )
uri System.Uri

Narrow() public method

public Narrow ( Type type ) : Object
type System.Type
return Object

Oneway() public method

public Oneway ( Command command ) : void
command Command
return void

Request() public method

public Request ( Command command ) : Response
command Command
return Apache.NMS.ActiveMQ.Commands.Response

Request() public method

public Request ( Command command, System.TimeSpan timeout ) : Response
command Command
timeout System.TimeSpan
return Apache.NMS.ActiveMQ.Commands.Response

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

UpdateURIs() public method

public UpdateURIs ( bool rebalance, Uri updatedURIs ) : void
rebalance bool
updatedURIs System.Uri
return void