hhms
Class HTTPConnection

java.lang.Object
  extended byhhms.HTTPConnection

public class HTTPConnection
extends java.lang.Object

A HTTPConnection is a active HTTP connection to HHMS Gateway. A client uses a HTTPConnection to create one or more TopicConnections for producing and consuming messages. Must implements ErroHandler to receive error messages.

Sample code:
public void init() {
HTTPConnection = new hhms.HTTPConnection("http://156.xx.xxx.xx:5xxx", user, this, interval);
TopicSession ts = conn.createTopicSession();
ts.setPubSub(topic);
ts.setMessageListener(this);
}

Title: HTTPConnection

Copyright: Copyright (c) 2004

Company: CommunityGrids Labs at Indiana University


Constructor Summary
HTTPConnection(java.lang.String uri, java.lang.String userID, ErrorHandler eh)
          Class Constructor
HTTPConnection(java.lang.String uri, java.lang.String userID, ErrorHandler eh, int interval)
          Class Constructor specifying interval to polling
 
Method Summary
 void close()
          close HTTPConnection because HTTP is stateless connection, this close just send logout message to HHMS Gateway.
 hhms.soap.SOAPSession createSOAPSession()
          create and return a new SOAPSession
 TopicSession createTopicSession()
          create and return a new TopicSession
 void pollDisable()
          Enable polling from a disabled state
 void pollEnable()
          Disable polling from a Enabled state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPConnection

public HTTPConnection(java.lang.String uri,
                      java.lang.String userID,
                      ErrorHandler eh)
Class Constructor

Parameters:
uri - a uri of HHMS Gateway (e.g. http://somewhere.ucs.indiana.edu:1234)
userID - a user name as a identification
eh - an error handler object

HTTPConnection

public HTTPConnection(java.lang.String uri,
                      java.lang.String userID,
                      ErrorHandler eh,
                      int interval)
Class Constructor specifying interval to polling

Parameters:
uri - a uri of HHMS Gateway (e.g. http://somewhere.ucs.indiana.edu:1234)
userID - a user name as a identification
eh - an error handler object
interval - a interval between HTTP polling
Method Detail

createTopicSession

public TopicSession createTopicSession()
create and return a new TopicSession

Returns:
new TopicSession
See Also:
TopicSession

createSOAPSession

public hhms.soap.SOAPSession createSOAPSession()
create and return a new SOAPSession

Returns:
new SOAPSession
See Also:
SOAPSession

pollEnable

public void pollEnable()
Disable polling from a Enabled state


pollDisable

public void pollDisable()
Enable polling from a disabled state


close

public void close()
close HTTPConnection

because HTTP is stateless connection, this close just send logout message to HHMS Gateway.