org.inxar.hotswap
Class ProxyHotSwapEvent

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

public class ProxyHotSwapEvent
extends ProxyEvent

ProxyEvent subtype fired by the ProxyClass when a hotswap transaction has been initiated.

ProxyHotSwapEvent is a recent addition to the event heirarchy. It was added to the library in order for outside agents to receive notification that a hotswap is about to be executed. This is particularly important when there are change dependencies outside of the sourcefile:classfile relationship.

For example if you wanted to implement a JSP compiler, you will most likely be generating sourcefiles dynamically from a file.jsp source. Therefore, the condition of whether to hotswap is dependent upon the timestamp of file.jsp, not its file.java counterpart. Getting a ProxyHotSwapEvent allows the user to check if the file.jsp has been changed and regenerate a sourcefile if necessary.

Since:
0.8.4
See Also:
Serialized Form

Constructor Summary
ProxyHotSwapEvent(ProxyClass source)
          Standard constructor originates from the given ProxyClass source.
 
Method Summary
 ProxyClass getProxyClass()
          Returns the associated ProxyClass to which the source and classfiles 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

ProxyHotSwapEvent

public ProxyHotSwapEvent(ProxyClass source)
Standard constructor originates from the given ProxyClass source.
Method Detail

getProxyClass

public ProxyClass getProxyClass()
Returns the associated ProxyClass to which the source and classfiles are associated. This method is equivalent to (ProxyClass)event.getSource().

toString

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