util.rmi
Class RmiEvent

java.lang.Object
  extended by java.util.EventObject
      extended by util.rmi.RmiEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataEvent, MessageEvent, SerialEvent, URLEvent, WeatherEvent

public class RmiEvent
extends EventObject

An event class to use in RMI or Serializable context. Though the source field in the event object is transient this information is not serialized. This object simply provides an additional method, getSourceName() to allow the serialization of the sources name.

See Also:
Serialized Form

Field Summary
protected  InetAddress localHost
          The IP address of the host where the event was generated.
protected  String sourceName
          The string representation of the source.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RmiEvent(Object source)
          Constructs a new rmi event object with the specified source.
 
Method Summary
 InetAddress getHost()
          Returns the IP address of the originating host.
 String getSourceName()
          Returns the name of the source.
 void setSourceName(String srcname)
          Sets the name of the data event source.
 String toString()
          Returns a string decription of this event.
 
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

sourceName

protected String sourceName
The string representation of the source.


localHost

protected InetAddress localHost
The IP address of the host where the event was generated.

Constructor Detail

RmiEvent

public RmiEvent(Object source)
Constructs a new rmi event object with the specified source. The name of the source is immediately transfered into the sourceName field to allow object serialization.

Method Detail

getHost

public InetAddress getHost()
Returns the IP address of the originating host.


getSourceName

public String getSourceName()
Returns the name of the source. The default name is the result of the toString call on the source object, but the source name may be explicetly specified using the setSourceName(java.lang.String) method.


setSourceName

public void setSourceName(String srcname)
Sets the name of the data event source. Normally, the result of the toString call on the source object is used.


toString

public String toString()
Returns a string decription of this event.

Overrides:
toString in class EventObject