Added HandshakeRejectionEvent and fixed some Javadoc
This commit is contained in:
parent
8ab72b7a76
commit
5c19fe2849
41
src/main/java/envoy/event/HandshakeRejectionEvent.java
Normal file
41
src/main/java/envoy/event/HandshakeRejectionEvent.java
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
package envoy.event;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signifies to the client that the handshake failed for the attached
|
||||||
|
* reason.<br>
|
||||||
|
* <br>
|
||||||
|
* Project: <strong>envoy-common</strong><br>
|
||||||
|
* File: <strong>HandshakeRejectionEvent.java</strong><br>
|
||||||
|
* Created: <strong>28 Jan 2020</strong><br>
|
||||||
|
*
|
||||||
|
* @author Kai S. K. Engelbart
|
||||||
|
* @since Envoy Common v0.3-alpha
|
||||||
|
*/
|
||||||
|
public class HandshakeRejectionEvent implements Event<String> {
|
||||||
|
|
||||||
|
private final String reason;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8723270093452609197L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an instance of {@link HandshakeRejectionEvent} with an empty reason.
|
||||||
|
*
|
||||||
|
* @since Envoy Common v0.3-alpha
|
||||||
|
*/
|
||||||
|
public HandshakeRejectionEvent() { this(""); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an instance of {@link HandshakeRejectionEvent}.
|
||||||
|
*
|
||||||
|
* @param reason the reason why the handshake was rejected
|
||||||
|
* @since Envoy Common v0.3-alpha
|
||||||
|
*/
|
||||||
|
public HandshakeRejectionEvent(String reason) { this.reason = reason; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the reason why the handshake was rejected
|
||||||
|
* @since Envoy Common v0.3-alpha
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String get() { return reason; }
|
||||||
|
}
|
@ -9,6 +9,7 @@ package envoy.event;
|
|||||||
* Created: <strong>28 Jan 2020</strong><br>
|
* Created: <strong>28 Jan 2020</strong><br>
|
||||||
*
|
*
|
||||||
* @author Kai S. K. Engelbart
|
* @author Kai S. K. Engelbart
|
||||||
|
* @since Envoy Common v0.3-alpha
|
||||||
*/
|
*/
|
||||||
public class IdGeneratorRequest implements Event<Void> {
|
public class IdGeneratorRequest implements Event<Void> {
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public class MessageStatusChangeEvent implements Event<Message.MessageStatus> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialises a {@link MessageStatusChangeEvent} through a message.
|
* Initializes a {@link MessageStatusChangeEvent} through a message.
|
||||||
*
|
*
|
||||||
* @param message the message from which to build the event
|
* @param message the message from which to build the event
|
||||||
* @since Envoy Common v0.2-alpha
|
* @since Envoy Common v0.2-alpha
|
||||||
|
Reference in New Issue
Block a user