Any application component interested in the remote/local resource status and client status should implement the INetworkAware
interface or extend the NetworkAwareBase
object. It also should call the DetectAndHandle.detectAndHandle(e,contextKey)
when an network error occurs.
The application components can create their customized handlers by using the NetFaults public API . Lotus
® Expeditor platform components can also create customized Faults and detectors by using the NetFaults internal API.
Applications can use the NetStatus public API to detect the real network status.
Expeditor network framework replaces the default VM implementations of HTTP and HTTPS UrlStreamHandler's which are based on the Apache HTTP client. The UrlStreamHandler
implementation will utilize the Apache HTTP client.
The platform does not provide default implementations for remote resource monitors.
Enabling network aware applications
LotusParent topic: Developing network aware applications
Expeditor client provides Client Services target definition support in the Rational
® tooling environment. These target definitions simplify the creation and configuration of network aware application projects, enabling you to select the target-embedded network layer APIs and libraries.
Creating and configuring handlers
The net faults framework provides an extension point called com.ibm.rcp.net.faults.handler
. This extension point can be extended by an application that wishes to perform a certain activity at the time of a network fault. When a network error is reported to the framework through detectAndHandle()
, the platform will categorize the problem into a fault or set of faults and notify every handler. The handler can then iterate through the generated faults and take appropriate action.
Using the NetStatus API to detect the real network status
Applications can use the Netstatus API to detect if the network is on or off.
Using enhanced HttpClient
No special coding is required to use the replacement URLStreamHandlers/URLConnections
for HTTP and HTTPS.
Monitoring remote resources
Using the notification and check models