|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eodistribution.client.EODistributionChannel | +--com.webobjects.eodistribution.client.EOHTTPChannel
An EOHTTPChannel is a concrete implementation of an EODistributionChannel which handles communication between the client and server in distributed Java Client applications using the HTTP protocol (POST commands).
EOHTTPChannels use regular sockets to establish the connection. You can subclass
EOHTTPChannel and override the createSocket
method if you want to
use different kinds of sockets, for example to implement an SSL channel.
Inner classes inherited from class com.webobjects.eodistribution.client.EODistributionChannel |
EODistributionChannel.Delegate |
Field Summary | |
static String |
ApplicationURLKey
The name of the applicationURL connection key. |
static String |
ComponentURLKey
The name of the componentURL connection key. |
static String |
PageKey
The name of the page connection key. |
static String |
SessionIDKey
The name of the sessionID connection key. |
Constructor Summary | |
EOHTTPChannel()
Creates a new HTTP channel. |
Method Summary | |
NSArray |
connectionKeys()
Returns the connection keys for EOHTTPChannels (not all the keys have to be specified, usually the application URL is sufficient): |
Socket |
createSocket(String protocol,
String hostName,
int portNumber)
Creates and returns a new socket to communicate with the server. |
void |
establishConnection()
Establishes a connection with the server and begins communication using the HTTP protocol. |
Object |
responseToMessage(Object message,
NSCoder coder)
Sends the message message from the client to the server using the
HTTP POST command. |
Methods inherited from class com.webobjects.eodistribution.client.EODistributionChannel |
channelWithName, connectionDictionary, delegate, setConnectionDictionary, setDelegate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ApplicationURLKey
applicationURL
connection key.
The application URL is the URL of the server application.public static final String ComponentURLKey
componentURL
connection key.
The component URL identifies the WOJavaClientComponent component
used on the server side to represent the client.public static final String PageKey
page
connection key.
If specified, the channel connects to a WOJavaClientComponent
on the page specified by name with this connection key
(the default is the Main page).public static final String SessionIDKey
sessionID
connection key.
The session ID identifies the session used on the server
side for the client.Constructor Detail |
public EOHTTPChannel()
Method Detail |
public NSArray connectionKeys()
Returns the connection keys for EOHTTPChannels (not all the keys have to be specified, usually the application URL is sufficient):
applicationURL | The URL of the server application. |
componentURL | The component URL of the WOJavaClientComponent on the server side. |
sessionID | The Session ID of the session on the server side. |
page | The page to connect to. |
connectionKeys
in class EODistributionChannel
public Socket createSocket(String protocol, String hostName, int portNumber) throws IOException
protocol
- the communication protocol to usehostName
- the name of the host to connect toportNumber
- the port number to connect topublic void establishConnection()
NSForwardException
containing an IOException
if a
communication problem occurs and an IllegalArgumentException
if
required information is missing from the connection dictionary.establishConnection
in class EODistributionChannel
com.webobjects.eodistribution.client.EODistributionChannel
EODistributionChannel.responseToMessage(Object, NSCoder)
public Object responseToMessage(Object message, NSCoder coder)
message
from the client to the server using the
HTTP POST command. The message is encoded before it is sent using
the coder coder
. Synchronously receives, decodes, and
returns the response to the message. Throws an IllegalStateException
if the method is re-entered or an NSForwardException
containing an
IOException
if a communication problem occurs.responseToMessage
in class EODistributionChannel
message
- the message object to be sent to the servercoder
- the coder to be used to encode the message object
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |