This repository has been archived on 2021-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
envoy/common/src/main/java/envoy/event/IsTyping.java

42 lines
1.0 KiB
Java

package envoy.event;
/**
* This event should be sent when a user is currently typing something in a chat.
*
* @author Leon Hofmeister
* @since Envoy Client v0.2-beta
*/
public final class IsTyping extends Event<Long> {
private final long destinationID;
private static final long serialVersionUID = 1L;
/**
* The number of milliseconds that this event will be active.
* <p>
* Currently set to 3.5 seconds.
*
* @since Envoy Common v0.2-beta
*/
public static final int millisecondsActive = 3500;
/**
* Creates a new {@code IsTyping} event with originator and recipient.
*
* @param sourceID the ID of the originator
* @param destinationID the ID of the contact the user wrote to
* @since Envoy Common v0.2-beta
*/
public IsTyping(Long sourceID, long destinationID) {
super(sourceID);
this.destinationID = destinationID;
}
/**
* @return the ID of the contact in whose chat the user typed something
* @since Envoy Common v0.2-beta
*/
public long getDestinationID() { return destinationID; }
}