com.bea.wlevs.adapters.httppubsub.support
Class HttpPubSubHelper.Client
java.lang.Object
|
+--com.bea.wlevs.adapters.httppubsub.support.HttpPubSubHelper.Client
- public static class HttpPubSubHelper.Client
- extends java.lang.Object
PubSub Client representing a single client connection to a pubsub server. This holds state that applies
to a given client connection, and is not thread safe.
|
Constructor Summary
|
HttpPubSubHelper.Client(java.lang.String serverURL,
java.lang.String user,
java.lang.String password)
|
|
Method Summary
|
com.bea.httppubsub.json.JSONArray |
connect()
Send a connect request to the server. |
void |
disconnect()
|
void |
handshake()
|
void |
publish(java.lang.String data,
java.lang.String channelName)
Publish data to a channel |
com.bea.httppubsub.json.JSONArray |
subscribe(java.lang.String channelName)
Subscribe to a channel |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
HttpPubSubHelper.Client
public HttpPubSubHelper.Client(java.lang.String serverURL,
java.lang.String user,
java.lang.String password)
handshake
public void handshake()
throws java.io.IOException
connect
public com.bea.httppubsub.json.JSONArray connect()
throws java.io.IOException
- Send a connect request to the server. This may block until there is a message
available for the client.
- Returns:
- Response from server, or null if the request was unsuccessful and the server
did not return advice "retry"
- Throws:
- java.io.IOException -
publish
public void publish(java.lang.String data,
java.lang.String channelName)
throws java.io.IOException
- Publish data to a channel
- Parameters:
data - channelName - - Throws:
- java.io.IOException -
subscribe
public com.bea.httppubsub.json.JSONArray subscribe(java.lang.String channelName)
throws java.io.IOException
- Subscribe to a channel
- Parameters:
channelName - - Returns:
- Response from server, or null if the request was unsuccessful
- Throws:
- java.io.IOException -
disconnect
public void disconnect()
Copyright © 2007 BEA Systems All Rights Reserved.