TROSynapseSuperHttpChannel
From RemObjects Software
This is a RemObjects SDK Architecture entry
Feel free to add your notes to this topic below.
Overview
The Super HTTP Channel implements the enhanced HTTP based channel which provides a sophisticated and flexible communication channel which uses persistent connections to enable true asynchronous calls and server callbacks.
The channel is based on the open source Synapse components that are available at http://synapse.ararat.cz.
File
- uROSynapseSuperHttpChannel
Declaration
TROSynapseSuperHttpChannel = class(TROBaseSuperHttpChannel)
Hierarchy
- TROComponent
- TROBaseConnection
- TROTransportChannel
- TROBaseSuperHttpChannel
- TROSynapseSuperHttpChannel
- TROBaseSuperHttpChannel
- TROTransportChannel
- TROBaseConnection
Properties
| | | |
|---|---|---|
| Active | Boolean | Specifies whether the channel is currently active, which means has an open connection to the server, or is in the process of (re-)establishing a connection (true) or not (false). |
| ConnectTimeout | Integer | Specifies the timeout, in milliseconds, after which a connect will be aborted if no response has been received. The default value is 10,000 (10 second).
If you are expecting long processing times on your server, make sure to adjust this timeout accordingly. |
| DisableNagle | Boolean | Controls whether data packets are sent individually or if small packets are held back to send as part of fewer larger data packets.
Normally, you will want this disabled as it can have a significant effect on performance. The only time when its worth keeping the property enabled is when there are many small packets to be sent and you need to keep network bandwidth to a minimum. |
| DispatchOptions | TRODispatchOptions | Configures the available fail-over and load balancing options provided by the RemObjects SDK.
By default, channels are set up to talk to one specific server only. Two independent options are available to provide fail-over and load balancing:
Enabling any of these options obviously requires the server to be implemented in a stateless way, so that it does not depend on all requests from a client going to the same server. This implies using a class factory different from Per-Client and, if sessions are used, a session manager that allows sharing of session state between servers. |
| HttpRequestTimeout | Integer | Specifies the time frame, in milliseconds, within which the response for any given request must be received (default is 10,000, 10 seconds). If no response has been received after the specified time, an exception is raised and the call will fail. |
| MaxPackageSize | Integer | The maximum size of data package that the channel will transport (default is 1048576, 1MB). |
| RequestTimeout | Integer | Specifies the time frame, in milliseconds, within which the response for any given request must be received (default is 60,000, 1 minute).
If no response has been received after the specified time, an exception is raised and the call will fail. |
| ServerLocators | TROServerLocatorCollection | Optionally, this collection property can be filled to contain a list of possible servers to be used for fail-over or load balancing purposes.
Depending on the settings configured in DispatchOptions, the channel will automatically spread calls over the available servers, or fall back to another server if one fails. |
| SessionId | TGuid | session ID that is used to connect to server. |
| TargetUrl | String | The address of the server. By default, this is usually the host name of your server, followed by 8099, plus the name of the dispatcher configured on the server; for example: http://myserver:8099/bin |
Events
| | |
|---|---|
| OnException | Fires if an exception is raised during the execution of a remote request.
This could be an exception returned from the server, a communication problem or an error within the client. Depending on the type of error, your event handler can try to rectify the problem, and set aRetry to true to have the channel try and perform the request again. For example, an application could show a dialog asking the user to confirm his internet connection is available, with Cancel and Retry buttons. If aRetry is set to true and the call succeeds at the second attempt, the call will return to the original code that initiated the request, as if the exception never happened. |
| OnInvalidClientID | Fires when a server returns correspondent error |
| OnServerLocatorAssignment | Fires before assigning ServerLocator. |
See Also
Product: RemObjects SDK
Current version: RemObjects SDK 'Vinci' (5.0)
Lists — Glossary — Features — How To — Components — Tools — Samples — Articles — Architecture — Issues
Categories: Text | RemObjects SDK | Architecture | Channel | Class | Component | Delphi
