pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.invocation.lifecycle
Class FileResource

java.lang.Object
  extended by org.torweg.pulse.invocation.lifecycle.FileResource
All Implemented Interfaces:
LifecycleResource

public class FileResource
extends java.lang.Object
implements LifecycleResource

a LifecyleResource representing a File.

Version:
$Revision: 1390 $
Author:
Thomas Weber

Constructor Summary
FileResource(java.io.File f)
          builds a new FileResource.
 
Method Summary
 java.io.File getFile()
          Returns the File to whom this Resource is linked.
 boolean isModified()
          checks if the file has been modified since the last check.
 void restart()
          simply calls shutdown() and startup().
 void shutdown()
          does nothing, only here to satisfy the interface.
 void startup()
          updates the last modified timestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileResource

public FileResource(java.io.File f)
builds a new FileResource.

Parameters:
f - the file represented by the FileResource
Method Detail

getFile

public final java.io.File getFile()
Returns the File to whom this Resource is linked.

Returns:
Returns the File to whom this Resource is linked.

isModified

public final boolean isModified()
checks if the file has been modified since the last check.

Specified by:
isModified in interface LifecycleResource
Returns:
true, if the file has been modified.

startup

public final void startup()
updates the last modified timestamp.

Specified by:
startup in interface LifecycleResource

shutdown

public final void shutdown()
does nothing, only here to satisfy the interface.

Specified by:
shutdown in interface LifecycleResource

restart

public final void restart()
simply calls shutdown() and startup().

Specified by:
restart in interface LifecycleResource