Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidied Exceptions

  • Loading branch information...
commit 0f59c109b286cb5620ed0dd036b07ba36f35765e 1 parent e3997e7
Ann Witbrock authored
View
6 java/EmitLog.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -7,8 +6,7 @@
private static final String EXCHANGE_NAME = "logs";
- public static void main(String[] argv)
- throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -41,5 +39,5 @@ private static String joinStrings(String[] strings, String delimiter) {
}
return words.toString();
}
-
}
+
View
5 java/EmitLogDirect.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -7,8 +6,7 @@
private static final String EXCHANGE_NAME = "direct_logs";
- public static void main(String[] argv)
- throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -50,3 +48,4 @@ private static String joinStrings(String[] strings, String delimiter, int startI
return words.toString();
}
}
+
View
3  java/EmitLogTopic.java
@@ -6,8 +6,7 @@
private static final String EXCHANGE_NAME = "topic_logs";
- public static void main(String[] argv)
- throws Exception {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
View
5 java/NewTask.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,7 +7,7 @@
private static final String TASK_QUEUE_NAME = "task_queue";
- public static void main(String[] argv) throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -43,4 +42,4 @@ private static String joinStrings(String[] strings, String delimiter) {
}
return words.toString();
}
-}
+}
View
6 java/ReceiveLogs.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private static final String EXCHANGE_NAME = "logs";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -34,3 +31,4 @@ public static void main(String[] argv)
}
}
}
+
View
6 java/ReceiveLogsDirect.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private static final String EXCHANGE_NAME = "direct_logs";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -43,3 +40,4 @@ public static void main(String[] argv)
}
}
}
+
View
3  java/ReceiveLogsTopic.java
@@ -7,8 +7,7 @@
private static final String EXCHANGE_NAME = "topic_logs";
- public static void main(String[] argv)
- throws Exception {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
View
7 java/Recv.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private final static String QUEUE_NAME = "hello";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -29,4 +26,4 @@ public static void main(String[] argv)
System.out.println(" [x] Received '" + message + "'");
}
}
-}
+}
View
6 java/Send.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -7,8 +6,7 @@
private final static String QUEUE_NAME = "hello";
- public static void main(String[] argv)
- throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -23,4 +21,4 @@ public static void main(String[] argv)
channel.close();
connection.close();
}
-}
+}
View
6 java/Worker.java
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private static final String TASK_QUEUE_NAME = "task_queue";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -43,3 +40,4 @@ private static void doWork(String task) throws InterruptedException {
}
}
}
+
Please sign in to comment.
Something went wrong with that request. Please try again.