ing
This commit is contained in:
parent
5d7ed7c369
commit
162bb2c15d
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<groupId>com.loafle.overflow</groupId>
|
||||
<artifactId>commons-java</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.114-SNAPSHOT</version>
|
||||
<version>1.0.115-SNAPSHOT</version>
|
||||
<name>com.loafle.overflow.commons-java</name>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
public class PublishMessage {
|
||||
private TargetType targetType;
|
||||
private List<String> targets;
|
||||
private PublishMessageType messageType;
|
||||
private PublishMessageBody message;
|
||||
|
||||
public void setTargetType(TargetType targetType) {
|
||||
|
@ -31,6 +32,20 @@ public class PublishMessage {
|
|||
return targets;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the messageType
|
||||
*/
|
||||
public PublishMessageType getMessageType() {
|
||||
return messageType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param messageType the messageType to set
|
||||
*/
|
||||
public void setMessageType(PublishMessageType messageType) {
|
||||
this.messageType = messageType;
|
||||
}
|
||||
|
||||
public void setMessage(PublishMessageBody message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
@ -53,6 +68,25 @@ public class PublishMessage {
|
|||
}
|
||||
}
|
||||
|
||||
public static enum PublishMessageType {
|
||||
TextMessage((short) 1), BinaryMessage((short) 2), CloseMessage((short) 8), PingMessage((short) 9),
|
||||
PongMessage((short) 10),;
|
||||
|
||||
private final Short value;
|
||||
|
||||
/**
|
||||
* @param value
|
||||
*/
|
||||
PublishMessageType(final Short value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Short getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class PublishMessageBody {
|
||||
private String jsonrpc = "2.0";
|
||||
private PublishMessageBodyNotification result;
|
||||
|
|
Loading…
Reference in New Issue
Block a user