Interface ITransport
Represents the logical networking transport layer. Transports implment the low level protocol specific portion of the Communication between the Client and a Broker such as TCP, UDP, etc. Transports make use of WireFormat objects to handle translateing the cononical OpenWire Commands used in this client into binary wire level packets that can be sent to the Broker or Service that the Transport connects to.
Inherited Members
Namespace: Apache.NMS.ActiveMQ.Transport
Assembly: Apache.NMS.ActiveMQ.dll
Syntax
public interface ITransport : IStartable, IDisposable, IStoppable
Properties
| Improve this Doc View SourceAsyncTimeout
Timeout in milliseconds to wait for sending asynchronous messages or commands. Set to -1 for infinite timeout.
Declaration
int AsyncTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Command
Declaration
CommandHandler Command { get; set; }
Property Value
| Type | Description |
|---|---|
| CommandHandler |
Exception
Declaration
ExceptionHandler Exception { get; set; }
Property Value
| Type | Description |
|---|---|
| ExceptionHandler |
Interrupted
Declaration
InterruptedHandler Interrupted { get; set; }
Property Value
| Type | Description |
|---|---|
| InterruptedHandler |
IsConnected
Declaration
bool IsConnected { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Indiciates if the Transport is current Connected to is assigned URI. |
IsDisposed
Declaration
bool IsDisposed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Indicates if this Transport has already been disposed and can no longer be used. |
IsFaultTolerant
Declaration
bool IsFaultTolerant { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Indicates if this Transport is Fault Tolerant or not. A fault Tolerant Transport handles low level connection errors internally allowing a client to remain unaware of wire level disconnection and reconnection details. |
IsReconnectSupported
Returns true if this Transport supports reconnections.
Declaration
bool IsReconnectSupported { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsUpdateURIsSupported
Returns true if this Transport can accept updated lists of connection Uri's.
Declaration
bool IsUpdateURIsSupported { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
RemoteAddress
Declaration
Uri RemoteAddress { get; }
Property Value
| Type | Description |
|---|---|
| System.Uri | The Remote Address that this transport is currently connected to. |
Resumed
Declaration
ResumedHandler Resumed { get; set; }
Property Value
| Type | Description |
|---|---|
| ResumedHandler |
Timeout
Timeout in milliseconds to wait for sending synchronous messages or commands. Set to -1 for infinite timeout.
Declaration
int Timeout { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
WireFormat
Returns the IWireFormat object that this transport uses to marshal and unmarshal Command objects.
Declaration
IWireFormat WireFormat { get; }
Property Value
| Type | Description |
|---|---|
| IWireFormat |
Methods
| Improve this Doc View SourceAsyncRequest(Command)
Sends a Command object which requires a response from the Broker but does not wait for the response, instead a FutureResponse object is returned that the caller can use to wait on the Broker's response.
Declaration
FutureResponse AsyncRequest(Command command)
Parameters
| Type | Name | Description |
|---|---|---|
| Command | command | A Command |
Returns
| Type | Description |
|---|---|
| FutureResponse |
Narrow(Type)
Allows a caller to find a specific type of Transport in the Chain of Transports that is created. This allows a caller to find a specific object in the Transport chain and set or get properties on that specific instance. If the requested type isn't in the chain than Null is returned.
Declaration
object Narrow(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | A System.Type |
Returns
| Type | Description |
|---|---|
| System.Object | A System.Object |
Oneway(Command)
Sends a Command object on the Wire but does not wait for any response from the receiver before returning.
Declaration
void Oneway(Command command)
Parameters
| Type | Name | Description |
|---|---|---|
| Command | command | A Command |
Request(Command)
Sends a Command to the Broker and waits for a Response to that Command before returning, this version waits indefinitely for a response.
Declaration
Response Request(Command command)
Parameters
| Type | Name | Description |
|---|---|---|
| Command | command | A Command |
Returns
| Type | Description |
|---|---|
| Response | A Response |
Request(Command, TimeSpan)
Sends a Command to the Broker and waits for the given TimeSpan to expire for a response before returning.
Declaration
Response Request(Command command, TimeSpan timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| Command | command | A Command |
| System.TimeSpan | timeout | A System.TimeSpan |
Returns
| Type | Description |
|---|---|
| Response | A Response |
UpdateURIs(Boolean, Uri[])
Updates the Uri's that this Transport is aware of and will use to connect itself to. If the rebalance option is true this method will terminate any current connection and reconnect to another available Uri.
Declaration
void UpdateURIs(bool rebalance, Uri[] updatedURIs)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | rebalance | A System.Boolean |
| System.Uri[] | updatedURIs | A System.Uri |