com.realtime.crossfire.jxclient.timeouts
Class Event

java.lang.Object
  extended by com.realtime.crossfire.jxclient.timeouts.Event
All Implemented Interfaces:
java.lang.Comparable<Event>

public class Event
extends java.lang.Object
implements java.lang.Comparable<Event>

Stores information of a timeout event.


Field Summary
private  long timeout
          The timeout.
private  TimeoutEvent timeoutEvent
          The timeout event to execute.
 
Constructor Summary
Event(int timeout, TimeoutEvent timeoutEvent)
          Create a new instance.
 
Method Summary
 int compareTo(Event o)
          
 boolean equals(java.lang.Object obj)
          
 long getTimeout()
          Return the timeout.
 TimeoutEvent getTimeoutEvent()
          Return the timeout event.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeout

private final long timeout
The timeout. It is an absolute timestamp as returned by System.currentTimeMillis().


timeoutEvent

@NotNull
private final TimeoutEvent timeoutEvent
The timeout event to execute.

Constructor Detail

Event

public Event(int timeout,
             @NotNull
             TimeoutEvent timeoutEvent)
Create a new instance.

Parameters:
timeout - The timeout in milliseconds; relative to "now".
timeoutEvent - The timeout event to execute.
Method Detail

compareTo

public int compareTo(@NotNull
                     Event o)

Specified by:
compareTo in interface java.lang.Comparable<Event>

equals

public boolean equals(@Nullable
                      java.lang.Object obj)

Overrides:
equals in class java.lang.Object

getTimeout

public long getTimeout()
Return the timeout.

Returns:
The timeout.

getTimeoutEvent

@NotNull
public TimeoutEvent getTimeoutEvent()
Return the timeout event.

Returns:
The timeout event.

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object