55 lines
1.4 KiB
Java
55 lines
1.4 KiB
Java
package envoy.event;
|
|
|
|
/**
|
|
* This event should be sent when a user wrote anything in a chat.
|
|
* <p>
|
|
* Project: <strong>envoy-client</strong><br>
|
|
* File: <strong>IsWriting.java</strong><br>
|
|
* Created: <strong>24.07.2020</strong><br>
|
|
*
|
|
* @author Leon Hofmeister
|
|
* @since Envoy Client v0.2-beta
|
|
*/
|
|
public class IsWriting extends Event<Long> {
|
|
|
|
private final long destinationID;
|
|
|
|
private final String displayName;
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* The number of milliseconds that this event will be active.<br>
|
|
* Currently set to 3.5 seconds.
|
|
*
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public static final int millisecondsActive = 3500;
|
|
|
|
/**
|
|
* Creates a new {@code IsWriting} with originator and recipient.
|
|
*
|
|
* @param sourceID the id of the originator
|
|
* @param displayName the name of the originator
|
|
* @param destinationID the id of the contact the user wrote to
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public IsWriting(Long sourceID, long destinationID, String displayName) {
|
|
super(sourceID);
|
|
this.destinationID = destinationID;
|
|
this.displayName = displayName;
|
|
}
|
|
|
|
/**
|
|
* @return the id of the contact in whose chat the user wrote something
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public long getDestinationID() { return destinationID; }
|
|
|
|
/**
|
|
* @return the name of the originator to display
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public String getDisplayName() { return displayName; }
|
|
}
|