NVelocity.Runtime.Resource
Class Resource

This class represent a general text resource that may have been retrieved from any number of possible sources. *

Field Summary
object data
         Resource might require ancillary storage of some kind
string encoding
         Character encoding of this resource
long lastModified
         The file modification time (in milliseconds) for the cached template.
long MILLIS_PER_SECOND
         The number of milliseconds in a minute, used to calculate the check interval.
long modificationCheckInterval
         How often the file modification time is checked (in milliseconds).
string name
         Name of the resource
long nextCheck
         The next time the file modification time will be checked (in milliseconds).
NVelocity.Runtime.Resource.Loader.ResourceLoader resourceLoader
         The template loader that initially loaded the input stream for this template, and knows how to check the source of the input stream for modification.
NVelocity.Runtime.RuntimeServices rsvc

Constructor Summary
Resource()
         Default constructor

Property Summary
object Data
string Encoding
long LastModified
long ModificationCheckInterval
string Name
NVelocity.Runtime.Resource.Loader.ResourceLoader ResourceLoader
NVelocity.Runtime.RuntimeServices RuntimeServices

Method Summary
bool IsSourceModified()
bool Process()
         Perform any subsequent processing that might need to be done by a resource. In the case of a template the actual parsing of the input stream needs to be performed.
bool RequiresChecking()
         Is it time to check to see if the resource source has been updated?
void Touch()
         'Touch' this template and thereby resetting the nextCheck field.

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

data

protected internal object data

Resource might require ancillary storage of some kind


encoding

protected internal string encoding

Character encoding of this resource


lastModified

protected internal long lastModified

The file modification time (in milliseconds) for the cached template.


MILLIS_PER_SECOND

protected internal long MILLIS_PER_SECOND

The number of milliseconds in a minute, used to calculate the check interval.


modificationCheckInterval

protected internal long modificationCheckInterval

How often the file modification time is checked (in milliseconds).


name

protected internal string name

Name of the resource


nextCheck

protected internal long nextCheck

The next time the file modification time will be checked (in milliseconds).


resourceLoader

protected internal NVelocity.Runtime.Resource.Loader.ResourceLoader resourceLoader

The template loader that initially loaded the input stream for this template, and knows how to check the source of the input stream for modification.


rsvc

protected internal NVelocity.Runtime.RuntimeServices rsvc

Constructor Detail

Resource

public Resource()

Default constructor

Property Detail

Data

public object Data


Encoding

public string Encoding


LastModified

public long LastModified


ModificationCheckInterval

public long ModificationCheckInterval


Name

public string Name


ResourceLoader

public NVelocity.Runtime.Resource.Loader.ResourceLoader ResourceLoader


RuntimeServices

public NVelocity.Runtime.RuntimeServices RuntimeServices

Method Detail

IsSourceModified

public bool IsSourceModified()


Process

public bool Process()

Perform any subsequent processing that might need to be done by a resource. In the case of a template the actual parsing of the input stream needs to be performed.


RequiresChecking

public bool RequiresChecking()

Is it time to check to see if the resource source has been updated?


Touch

public void Touch()

'Touch' this template and thereby resetting the nextCheck field.