Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.netaddr.event
Class ChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.netaddr.event.ChangeEvent
All Implemented Interfaces:
Serializable

public class ChangeEvent
extends EventObject

A ChangeEvent is fired on change of the network configuration of the computer.

Author:
Damian Minkov
See Also:
Serialized Form

Field Summary
static int ADDRESS_DOWN
          Event type for address going down.
static int ADDRESS_UP
          Event type for interface going down.
static int DNS_CHANGE
          Event type for dns change.
static int IFACE_DOWN
          Event type for interface going down.
static int IFACE_UP
          Event type for interface going up.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ChangeEvent(Object source, int type)
          Creates event.
ChangeEvent(Object source, int type, boolean standby)
          Creates event.
ChangeEvent(Object source, int type, InetAddress address)
          Creates event.
ChangeEvent(Object source, int type, InetAddress address, boolean standby, boolean initial)
          Creates event.
 
Method Summary
 InetAddress getAddress()
          The address that changed.
 int getType()
          The type of this event.
 boolean isInitial()
          Is this event initial one.
 boolean isStandby()
          Whether this event is after suspend of the computer.
 String toString()
          Overrides toString method.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IFACE_DOWN

public static final int IFACE_DOWN
Event type for interface going down.

See Also:
Constant Field Values

IFACE_UP

public static final int IFACE_UP
Event type for interface going up.

See Also:
Constant Field Values

ADDRESS_DOWN

public static final int ADDRESS_DOWN
Event type for address going down.

See Also:
Constant Field Values

ADDRESS_UP

public static final int ADDRESS_UP
Event type for interface going down.

See Also:
Constant Field Values

DNS_CHANGE

public static final int DNS_CHANGE
Event type for dns change.

See Also:
Constant Field Values
Constructor Detail

ChangeEvent

public ChangeEvent(Object source,
                   int type,
                   InetAddress address,
                   boolean standby,
                   boolean initial)
Creates event.

Parameters:
source - the source of the event, the interface.
type - the type of the event.
address - the address that changed.
standby - is the event after a suspend of the computer.
initial - is this event initial one.

ChangeEvent

public ChangeEvent(Object source,
                   int type,
                   InetAddress address)
Creates event.

Parameters:
source - the source of the event, the interface.
type - the type of the event.
address - the address that changed.

ChangeEvent

public ChangeEvent(Object source,
                   int type)
Creates event.

Parameters:
source - the source of the event, the interface.
type - the type of the event.

ChangeEvent

public ChangeEvent(Object source,
                   int type,
                   boolean standby)
Creates event.

Parameters:
source - the source of the event.
type - the type of the event.
standby - is the event after a suspend of the computer.
Method Detail

getType

public int getType()
The type of this event.

Returns:
the type

getAddress

public InetAddress getAddress()
The address that changed.

Returns:
the address

isStandby

public boolean isStandby()
Whether this event is after suspend of the computer.

Returns:
the standby

toString

public String toString()
Overrides toString method.

Overrides:
toString in class EventObject
Returns:
string representing the event.

isInitial

public boolean isInitial()
Is this event initial one. When starting, no actual change has occurred in the system.

Returns:
is this event initial one.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.