tuwien.auto.calimero
Class CloseEvent

java.lang.Object
  extended by java.util.EventObject
      extended by tuwien.auto.calimero.CloseEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConnectionCloseEvent

public class CloseEvent
extends java.util.EventObject

Informs about the closing of a previously established communication with the KNX network.

In general, the source of the event is the connection object or network link to be closed.

See Also:
LinkListener, KNXListener, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CloseEvent(java.lang.Object source, boolean userRequest, java.lang.String reason)
          Creates a new close event object.
 
Method Summary
 java.lang.String getReason()
          Returns a brief textual description of the closing reason.
 boolean isUserRequest()
          Returns whether the close event was initiated by the user of the communication object.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CloseEvent

public CloseEvent(java.lang.Object source,
                  boolean userRequest,
                  java.lang.String reason)
Creates a new close event object.

Parameters:
source - the communication object to be closed
userRequest - true if the closing was requested by the user of the object, false otherwise (for example, a close initiated by a remote server)
reason - brief description of the reason leading to the close event
Method Detail

getReason

public final java.lang.String getReason()
Returns a brief textual description of the closing reason.

Returns:
reason as string

isUserRequest

public final boolean isUserRequest()
Returns whether the close event was initiated by the user of the communication object.

Returns:
true if close is user requested, false otherwise