org.inxar.hotswap
Class ProxyObjectSwapEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--org.inxar.hotswap.ProxyEvent
              |
              +--org.inxar.hotswap.ProxyObjectSwapEvent
All Implemented Interfaces:
Serializable

public class ProxyObjectSwapEvent
extends ProxyEvent

ProxyEvent subtype fired by the Proxy after a successful hotswap.

Since:
0.8.2
See Also:
Serialized Form

Constructor Summary
ProxyObjectSwapEvent(Proxy source, Object oldInstance, Object newInstance)
          Standard constructor originates from the given Proxy source and carries the given new and old Object instances.
 
Method Summary
 Object getNewInstance()
          Returns the new instance.
 Object getOldInstance()
          Returns the old instance.
 Proxy getProxy()
          Returns the associated Proxy to which the new and old instances are associated.
 String toString()
          Prints a summary of the object swap.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProxyObjectSwapEvent

public ProxyObjectSwapEvent(Proxy source,
                            Object oldInstance,
                            Object newInstance)
Standard constructor originates from the given Proxy source and carries the given new and old Object instances.
Method Detail

getProxy

public Proxy getProxy()
Returns the associated Proxy to which the new and old instances are associated. This method is equivalent to (Proxy)event.getSource().

getNewInstance

public Object getNewInstance()
Returns the new instance. If the object in an instanceof ProxyObject, proxy_onCommit() has already been invoked.

getOldInstance

public Object getOldInstance()
Returns the old instance. If the object in an instanceof ProxyObject, proxy_onRelease() has already been invoked, so be aware not to keep it around.

toString

public String toString()
Prints a summary of the object swap.
Overrides:
toString in class EventObject