hhms
Class Connection

java.lang.Object
  extended byhhms.Connection

public class Connection
extends java.lang.Object

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

Sample code:
public void init() {
Connection = new hhms.Connection("somewhere.ucs.indiana.edu", 1234, user, this);
TopicSession ts = conn.createTopicSession();
ts.setPubSub(topic);
ts.setMessageListener(this);
}

Title: Connection

Copyright: Copyright (c) 2004

Company: CommunityGrids Labs at Indiana University


Constructor Summary
Connection(java.lang.String hostName, int portNum, java.lang.String userID, ErrorHandler eh)
          Class Constructor
 
Method Summary
 void close()
          close HTTPConnection.
 SOAPSession createSOAPSession()
          create and return a new SOAPSession
 TopicSession createTopicSession()
          create and return a new TopicSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection(java.lang.String hostName,
                  int portNum,
                  java.lang.String userID,
                  ErrorHandler eh)
Class Constructor

Parameters:
hostName - a hostname of HHMS Gateway (e.g. somewhere.ucs.indiana.edu)
portNum - a port number of HHMS Gateway (e.g. 1234)
userID - a user name as a identification
eh - an error handler object
Method Detail

createTopicSession

public TopicSession createTopicSession()
create and return a new TopicSession

Returns:
new TopicSession
See Also:
TopicSession

createSOAPSession

public SOAPSession createSOAPSession()
create and return a new SOAPSession

Returns:
new SOAPSession
See Also:
SOAPSession

close

public void close()
close HTTPConnection.