Added HandshakeRejectionEvent and fixed some Javadoc

This commit is contained in:
Kai S. K. Engelbart 2020-01-28 18:58:44 +01:00
parent 8ab72b7a76
commit 5c19fe2849
3 changed files with 43 additions and 1 deletions

View 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; }
}

View File

@ -9,6 +9,7 @@ package envoy.event;
* Created: <strong>28 Jan 2020</strong><br>
*
* @author Kai S. K. Engelbart
* @since Envoy Common v0.3-alpha
*/
public class IdGeneratorRequest implements Event<Void> {

View File

@ -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
* @since Envoy Common v0.2-alpha