Interface Repository

Interface NetComponents::HttpURLConnection

This interface provides an HTTP URL connection to clients.

The HttpURLConnection represents an Http URL connection between a client and a server. Instances of this component can be used both to read from and to write to the resource referenced by the URL. In general, creating a connection to a URL is a multistep process:

  1. The connection object is created either in a CORBA Pseudo fashion by invoking the openConnection method on a URL ( in Java ).
  2. The setup parameters and general request properties are manipulated.
  3. The actual connection to the remote object is made, using the connect method.
  4. The remote object becomes available. The header fields and the contents of the remote object can be accessed.

The setup parameters are modified using the following methods:

and the general request properties are modified using the method:

Default values for the AllowUserInteraction and UseCaches parameters can be set using the methods setDefaultAllowUserInteraction and setDefaultUseCaches.

Each of the above set methods has a corresponding get method to retrieve the value of the parameter or general request property. The specific parameters and general request properties that are applicable are protocol specific.

The following methods are used to access the header fields and the contents after the connection is made to the remote object:

Certain header fields are accessed frequently. The methods:

provide convenient access to these fields. The getContentType method is used by the getContent method to determine the type of the remote object; subclasses may find it convenient to override the getContentType method.

In the common case, all of the pre-connection parameters and general request properties can be ignored: the pre-connection parameters and request properties default to sensible values. For most clients of this interface, there are only two interesting methods: getInputStream and getObject, which are mirrored in the URL class by convenience methods.

More information on the request properties and header fields of an http connection can be found at:

Operation Index


Generated by Sybase EAServer 5.0