Permalink
Browse files

java_nats_0.4.4

  • Loading branch information...
1 parent 490ab21 commit be1d4a25e61dcb247570623316c790d3094aae2b @tyagihas committed Sep 27, 2012
Showing with 270 additions and 302 deletions.
  1. +0 −12 .settings/org.eclipse.jdt.core.prefs
  2. +0 −3 .settings/org.eclipse.ltk.core.refactoring.prefs
  3. +2 −5 README.md
  4. +1 −2 benchmark/org/nats/benchmark/PubPerf.java
  5. +1 −2 benchmark/org/nats/benchmark/PubSubPerf.java
  6. +2 −2 doc/allclasses-frame.html
  7. +2 −2 doc/allclasses-noframe.html
  8. +3 −3 doc/constant-values.html
  9. +2 −2 doc/deprecated-list.html
  10. +2 −2 doc/help-doc.html
  11. +2 −2 doc/index-files/index-1.html
  12. +2 −2 doc/index-files/index-10.html
  13. +2 −2 doc/index-files/index-11.html
  14. +2 −2 doc/index-files/index-12.html
  15. +2 −14 doc/index-files/index-13.html
  16. +2 −2 doc/index-files/index-14.html
  17. +2 −2 doc/index-files/index-15.html
  18. +2 −2 doc/index-files/index-16.html
  19. +14 −2 doc/index-files/index-2.html
  20. +2 −2 doc/index-files/index-3.html
  21. +2 −2 doc/index-files/index-4.html
  22. +2 −2 doc/index-files/index-5.html
  23. +2 −2 doc/index-files/index-6.html
  24. +2 −2 doc/index-files/index-7.html
  25. +2 −2 doc/index-files/index-8.html
  26. +2 −2 doc/index-files/index-9.html
  27. +1 −1 doc/index.html
  28. +61 −59 doc/org/nats/Connection.html
  29. +2 −2 doc/org/nats/MsgHandler.html
  30. +2 −2 doc/org/nats/benchmark/PubPerf.html
  31. +2 −2 doc/org/nats/benchmark/PubSubPerf.html
  32. +2 −2 doc/org/nats/benchmark/class-use/PubPerf.html
  33. +2 −2 doc/org/nats/benchmark/class-use/PubSubPerf.html
  34. +2 −2 doc/org/nats/benchmark/package-frame.html
  35. +2 −2 doc/org/nats/benchmark/package-summary.html
  36. +2 −2 doc/org/nats/benchmark/package-tree.html
  37. +2 −2 doc/org/nats/benchmark/package-use.html
  38. +9 −2 doc/org/nats/class-use/Connection.html
  39. +13 −12 doc/org/nats/class-use/MsgHandler.html
  40. +2 −2 doc/org/nats/examples/AutoUnsub.html
  41. +2 −2 doc/org/nats/examples/Expected.html
  42. +2 −2 doc/org/nats/examples/MultiConnection.html
  43. +2 −2 doc/org/nats/examples/Pub.html
  44. +2 −2 doc/org/nats/examples/QueueSub.html
  45. +2 −2 doc/org/nats/examples/Request.html
  46. +2 −2 doc/org/nats/examples/Sub.html
  47. +2 −2 doc/org/nats/examples/SubTimeout.html
  48. +2 −2 doc/org/nats/examples/SubUnsub.html
  49. +2 −2 doc/org/nats/examples/class-use/AutoUnsub.html
  50. +2 −2 doc/org/nats/examples/class-use/Expected.html
  51. +2 −2 doc/org/nats/examples/class-use/MultiConnection.html
  52. +2 −2 doc/org/nats/examples/class-use/Pub.html
  53. +2 −2 doc/org/nats/examples/class-use/QueueSub.html
  54. +2 −2 doc/org/nats/examples/class-use/Request.html
  55. +2 −2 doc/org/nats/examples/class-use/Sub.html
  56. +2 −2 doc/org/nats/examples/class-use/SubTimeout.html
  57. +2 −2 doc/org/nats/examples/class-use/SubUnsub.html
  58. +2 −2 doc/org/nats/examples/package-frame.html
  59. +2 −2 doc/org/nats/examples/package-summary.html
  60. +2 −2 doc/org/nats/examples/package-tree.html
  61. +2 −2 doc/org/nats/examples/package-use.html
  62. +2 −2 doc/org/nats/package-frame.html
  63. +2 −2 doc/org/nats/package-summary.html
  64. +2 −2 doc/org/nats/package-tree.html
  65. +2 −2 doc/org/nats/package-use.html
  66. +2 −2 doc/overview-frame.html
  67. +2 −2 doc/overview-summary.html
  68. +2 −2 doc/overview-tree.html
  69. +2 −5 examples/org/nats/examples/AutoUnsub.java
  70. +2 −5 examples/org/nats/examples/Expected.java
  71. +4 −8 examples/org/nats/examples/MultiConnection.java
  72. +1 −5 examples/org/nats/examples/Pub.java
  73. +2 −5 examples/org/nats/examples/QueueSub.java
  74. +0 −1 examples/org/nats/examples/Request.java
  75. +2 −5 examples/org/nats/examples/Sub.java
  76. +2 −5 examples/org/nats/examples/SubTimeout.java
  77. +2 −4 examples/org/nats/examples/SubUnsub.java
  78. +34 −30 lib/org/nats/Connection.java
@@ -1,12 +0,0 @@
-#Tue Aug 21 10:29:37 JST 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
@@ -1,3 +0,0 @@
-#Tue Aug 21 10:23:25 JST 2012
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
View
@@ -37,7 +37,6 @@ import java.util.Properties;
import org.nats.*;
...
Connection conn = Connection.connect(new Properties());
-conn.start();
// Simple Publisher
conn.publish("foo", "Hello World!", null, null);
@@ -75,8 +74,7 @@ conn.subscribe("help", new MsgHandler() {
}
});
-conn.flush();
-conn.stop();
+conn.close();
```
## Wildcard Subcriptions
@@ -169,8 +167,7 @@ conn1.subscribe("test", new MsgHandler() {
});
// Form second connection to send message on
-Connection conn2 = Connection.connect(new Properties());
-conn2.start(new MsgHandler() {
+Connection conn2 = Connection.connect(new Properties(), new MsgHandler() {
public void execute(Object o) {
Connection conn = (Connection)o;
try {
@@ -15,7 +15,6 @@ public static void main(String[] args) throws Exception {
Properties prop = new Properties();
Connection conn = Connection.connect(prop);
- conn.start();
System.out.println("Performing Publish performance test");
final long start = System.nanoTime();
@@ -33,7 +32,7 @@ public void execute(Object o) {
}
});
- conn.stop();
+ conn.close();
System.exit(0);
}
}
@@ -11,14 +11,13 @@ public static void main(String[] args) throws Exception {
final int loop = (args.length == 0 || args[0] == null) ? 100000 : Integer.parseInt(args[0]);
int size = (args.length == 0 || args[1] == null) ? 1 : Integer.parseInt(args[1]);
final int hash = 2500;
+
StringBuffer buf = new StringBuffer();
for(int l = 0; l < size; l++) buf.append("a");
final String val = buf.toString();
final Connection conn1 = Connection.connect(new Properties());
- conn1.start();
final Connection conn2 = Connection.connect(new Properties());
- conn2.start();
System.out.println("Performing Publish/Subscribe performance test");
final long start = System.nanoTime();
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>All Classes</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>All Classes</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
View
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:05 JST 2012 -->
<title>Constant Field Values</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
@@ -172,7 +172,7 @@ <h2 title="org.nats">org.nats.*</h2>
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;java.lang.String</code></td>
<td><code><a href="org/nats/Connection.html#version">version</a></code></td>
-<td class="colLast"><code>"0.4.3"</code></td>
+<td class="colLast"><code>"0.4.4"</code></td>
</tr>
</tbody>
</table>
View
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>Deprecated List</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
View
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>API Help</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>A-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>P-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>Q-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>R-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>S-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -69,18 +69,6 @@ <h2 class="title">S</h2>
<dl>
<dt><span class="strong"><a href="../org/nats/Connection.html#SPC">SPC</a></span> - Static variable in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
<dd>&nbsp;</dd>
-<dt><span class="strong"><a href="../org/nats/Connection.html#start()">start()</a></span> - Method in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
-<dd>
-<div class="block">Establish a connection to the server and start a background thread for processing incoming and outgoing messages</div>
-</dd>
-<dt><span class="strong"><a href="../org/nats/Connection.html#start(org.nats.MsgHandler)">start(MsgHandler)</a></span> - Method in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
-<dd>
-<div class="block">Establish a connection to the server and start a background thread for processing incoming and outgoing messages</div>
-</dd>
-<dt><span class="strong"><a href="../org/nats/Connection.html#stop()">stop()</a></span> - Method in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
-<dd>
-<div class="block">Close the channel and stopping the background thread.</div>
-</dd>
<dt><span class="strong"><a href="../org/nats/Connection.html#SUB">SUB</a></span> - Static variable in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
<dd>&nbsp;</dd>
<dt><a href="../org/nats/examples/Sub.html" title="class in org.nats.examples"><span class="strong">Sub</span></a> - Class in <a href="../org/nats/examples/package-summary.html">org.nats.examples</a></dt>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>T-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>U-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>V-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>C-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -69,12 +69,24 @@ <h2 class="title">C</h2>
<dl>
<dt><span class="strong"><a href="../org/nats/MsgHandler.html#caller">caller</a></span> - Variable in class org.nats.<a href="../org/nats/MsgHandler.html" title="class in org.nats">MsgHandler</a></dt>
<dd>&nbsp;</dd>
+<dt><span class="strong"><a href="../org/nats/Connection.html#close()">close()</a></span> - Method in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
+<dd>
+<div class="block">Close the channel with flushing buffer and stop the background thread.</div>
+</dd>
+<dt><span class="strong"><a href="../org/nats/Connection.html#close(boolean)">close(boolean)</a></span> - Method in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
+<dd>
+<div class="block">Close the channel and stop the background thread.</div>
+</dd>
<dt><span class="strong"><a href="../org/nats/Connection.html#CONNECT">CONNECT</a></span> - Static variable in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="../org/nats/Connection.html#connect(java.util.Properties)">connect(Properties)</a></span> - Static method in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
<dd>
<div class="block">Create and return a Connection with various attributes.</div>
</dd>
+<dt><span class="strong"><a href="../org/nats/Connection.html#connect(java.util.Properties, org.nats.MsgHandler)">connect(Properties, MsgHandler)</a></span> - Static method in class org.nats.<a href="../org/nats/Connection.html" title="class in org.nats">Connection</a></dt>
+<dd>
+<div class="block">Create and return a Connection with various attributes.</div>
+</dd>
<dt><a href="../org/nats/Connection.html" title="class in org.nats"><span class="strong">Connection</span></a> - Class in <a href="../org/nats/package-summary.html">org.nats</a></dt>
<dd>
<div class="block">Connection represents a bidirectional channel to NATS server.</div>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>D-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>E-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>F-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>G-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>I-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>M-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
@@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc (version 1.7.0_04) on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc (version 1.7.0_04) on Thu Sep 27 11:09:06 JST 2012 -->
<title>O-Index</title>
-<meta name="date" content="2012-09-26">
+<meta name="date" content="2012-09-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
View
@@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
-<!-- Generated by javadoc on Wed Sep 26 15:00:40 JST 2012 -->
+<!-- Generated by javadoc on Thu Sep 27 11:09:06 JST 2012 -->
<title>Generated Documentation (Untitled)</title>
<script type="text/javascript">
targetPage = "" + window.location.search;
Oops, something went wrong.

0 comments on commit be1d4a2

Please sign in to comment.