Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed May 5, 2016
1 parent d2f6491 commit ed8a593
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/happyr/mq2php/MessageConsumer.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.text.SimpleDateFormat;

/**
*
* Consume messages, ie give them to the executor and handle errors.
*/
public class MessageConsumer {

Expand All @@ -21,7 +21,8 @@ public MessageConsumer(ExecutorInterface client) {
this.client = client;
}

public void handle(Message message) {
public void handle(Message message)
throws MessageExecutionFailedException {
String error = client.execute(message);

//if there was any error
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/happyr/mq2php/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.slf4j.LoggerFactory;

/**
* com.happyr.java.deferredEventWorker
*
*
* @author Tobias Nyholm
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.happyr.mq2php.util.Marshaller;

/**
* Created by tobias on 2016-05-05.
* An exception that is thrown by the executors if something unexpected happened.
*/
public class MessageExecutionFailedException extends RuntimeException {
private String error;
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/happyr/mq2php/message/Header.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.happyr.mq2php.message;

/**
* A representation of a message header.
*/
public class Header {

private String key;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/happyr/mq2php/message/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.ArrayList;

/**
* Message
* A representation of a message
*/
public class Message {

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/happyr/mq2php/queue/QueueClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
*/
public interface QueueClient {
/**
* Start receiving messages
*
* @return Message
* Start receiving messages. This will make use of the message consumer.
*/
void receive();
}
6 changes: 2 additions & 4 deletions src/main/java/com/happyr/mq2php/util/Serializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
import java.net.URLEncoder;

/**
*
* Serialize a message so it can be put on the queue.
*/
public class Serializer {
/**
* Return a serialized version of this message
*
* @return
* Return a serialized version of this message.
*/
public static String serialize(byte[] bytes) {
try {
Expand Down

0 comments on commit ed8a593

Please sign in to comment.