Author: mladen.turk(a)jboss.com
Date: 2008-06-11 01:47:04 -0400 (Wed, 11 Jun 2008)
New Revision: 1688
Modified:
sandbox/aloha/examples/org/jboss/aloha/MessageExample.java
sandbox/aloha/java/org/jboss/aloha/ConnectionFactory.java
Log:
Some updates
Modified: sandbox/aloha/examples/org/jboss/aloha/MessageExample.java
===================================================================
--- sandbox/aloha/examples/org/jboss/aloha/MessageExample.java 2008-06-11 05:44:05 UTC
(rev 1687)
+++ sandbox/aloha/examples/org/jboss/aloha/MessageExample.java 2008-06-11 05:47:04 UTC
(rev 1688)
@@ -37,8 +37,7 @@
ConnectionFactory cf = new ConnectionFactory(HttpConnection.class);
Connection c;
- cf.setPort(8000);
- c = cf.getConnection();
+ c = cf.getConnection("localhost", 8000);
Message m = new Message(Command.Info, "*/*;*");
c.sendMessage(m);
System.out.println("**** Response " + c.getResponseCode());
Modified: sandbox/aloha/java/org/jboss/aloha/ConnectionFactory.java
===================================================================
--- sandbox/aloha/java/org/jboss/aloha/ConnectionFactory.java 2008-06-11 05:44:05 UTC (rev
1687)
+++ sandbox/aloha/java/org/jboss/aloha/ConnectionFactory.java 2008-06-11 05:47:04 UTC (rev
1688)
@@ -96,7 +96,7 @@
this.conClass = conClass;
}
- public Connection getConnection()
+ public Connection getConnection(String host, int port)
{
Connection con;
try {
@@ -114,4 +114,9 @@
}
return con;
}
+
+ public Connection getConnection()
+ {
+ return getConnection(host, port);
+ }
}