Studio:Transport Server Component
The Transport Server
The Transport Server is an out of proc COM server component that provides the core connection communication with the target runtime. The server class factory model uses the REG_MULTIUSE so that all clients interact with a single process. The server component has the program ID of STRIDE.transportserver. This Program ID is purely internal. Script clients interact with the script wrapper.
This server requires that all clients explicitly register wit hthe client process ID. The server process automatically exits whe nall registered client processes have terminated. This is the same monitor policy implemented by other objects (such as the Reporter object). There is a script wrapper object to make the PID passing requirement transparent to script clients. The Program ID for the script wrapper is STRIDE.transport. This is the public name used to refer to this component.
Automation API
transport._TSEvents
This is an outgoing connection point interface that is optionally implemented by clients that wish to be notified of connection related events.
Option | Type | Description |
---|---|---|
OnConnect() | Method/Event | Fired when the transport connection state changes from disconnected to connected. |
OnDisconnect() | Method/Event | Fired when the transport connection state changes from connected to disconnected. |
OnError(string message) | Method/Event | Fired when there is a reportable error in the transport communication. |
transport.Connection
This is the root object for all connection-related functionality.
Option | Type | Description |
---|---|---|
ActiveTransport | Property, Object, Read-Only | Returns the current active transport object or null if none is active. |
bool Connect(int timeout[optional]) | Method | Attempts to create a runtime connection to a target using the active transport. The timeout value (in milliseconds) is passed to the runtime connection request and it fails if timeout is exceeded. Default timeout is 5 seconds (5000). Returns true if connection succeeded, false if either the transport or runtime connection failed. |
bool ConnectAsync(bool monitor[optional]) | Method | Asynchronous connection request. A background thread is started to attempt to establish the connection. If monitor is true, the thread will run continuously and attempt to reconnect whenever the connection is lost. If monitor is false (the default) the background thread will exit once a connection is initially established. |
bool Disconnect() | Method | Attempts to disconnect the runtime and the transport from the target. Returns true if successfully disconnected, false otherwise. |
bool DisconnectAsync() | Method | Initiates the request to disconnect from the target, but does not wait for an acknowledgement of the disconnect request from the runtime. Returns true if disconnect request initiated. |
ForceBroadcastMessageType | Property, bool | This is a runtime option that causes all broadcast messages to be sent to the peer runtime even if no remote subscribers are currently active for the message. The runtime has an optional mechanism to trap unhandled messages, so this might be necessary to get messages to a default handler. It seems likely that we could eliminate this setting completely by some minor changes to the runtime. However, absent any runtime changes, this setting is retained here as a way to enable this feature. |
IBlockDataDump | Property, bool | Turns IBlock dumps on or off. Default is off. If enabled, all IBlocks that are sent and received will be dumped to the STRIDE application log and to a predefined tracepoint. |
IsConnected | Property, bool, Read-only | Returns the current connection state. |
Ping | subobject | Ping settings |
TransportsLocation | Property, string | Sets/gets the current directory for transport DLLs. Changing this value will immediately change the values in the Transports collection and will cause the current connection (if any) to be closed. |
Transports | Collection | (link this one) |
TransportDataDump | Property, bool | Turns raw data dumps on or off. Default is off. If enabled, all SLAP messages that are sent and received by the transport will be dumped to the STRIDE application log and to a predefined tracepoint. |
transport.Connection.Ping
This is the interface for ping settings. All ping settings are automatically persisted in the registry and restored when the transport server is instantiated.
Name | Type | Description |
---|---|---|
Enabled | Property, bool | Turns the runtime ping messages on or off. This setting is persisted and restored automatically. |
Interval | Property, integer | Sets/gets the time interval between ping messages, in milliseconds. |
RetryCount | Property, integer | Sets/gets the number of allowable ping failures. Once this number if exceeded, the connection will be closed automatically. |
Timeout | Property, integer | Sets/gets the timeout value for the ping message in milliseconds. If a response is not received within this time, the ping fails. |
transport.Connections.Transports
This is the collection of currently available transports.
Name | Type | Description |
---|---|---|
Count | Property, integer, Read-only | Gives the number of transport items in the collection. |
Item(variant index) | Method | Returns the specified transport item. Index can be a zero-based integer value or a string representing the name of the transport. Each transport advertises a unique name via its API and that’s what we use as the string keys. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null. |
transport.Connections.Transports.Item
This is the interface associated with each transport object.
Name | Type | Description |
---|---|---|
Active | Property, bool | Sets/gets the active status of the transport. Only one transport can be active at any given time, so setting this to true for a transport that is not already active will cause the current active transport to be disconnected. Setting this property to true when the item is already active is a no-op. |
File | Property, string Read-only | Gets the full file path and name for the corresponding transport DLL. |
Name | Property, string Read-only | Gets the name of the transport item. |
Properties | Collection | (link this one) |
transport.Connections.Transports.Properties
This is the collection of properties for a given transport.
Name | Type | Description |
---|---|---|
Count | Property, integer, Read-only | Gives the number of properties in the collection. |
Item(variant index) | Method | Returns the specified property item. Index can be a zero-based integer value or a string representing the name of the property. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null. |
transport.Connections.Transports.Properties.Item
This is the interface for a specific transport property.
Name | Type | Description |
---|---|---|
AllowableValues | Property, string, Read-only | Gets a pipe-delimited string where each delimited value represents an allowable value for the property. Clients might use this to restrict or validate input. |
Name | Property, string, Read-only | Gets the name of the property item. |
Value | Property, string | Gets/sets the value of the property. When set, the validation method of the transport will be called. Any failures in validation will be returned as exceptions here. |