Return-Path: Delivered-To: apmail-jakarta-avalon-cvs-archive@apache.org Received: (qmail 51469 invoked from network); 11 Aug 2002 10:30:34 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 11 Aug 2002 10:30:34 -0000 Received: (qmail 27543 invoked by uid 97); 11 Aug 2002 10:30:54 -0000 Delivered-To: qmlist-jakarta-archive-avalon-cvs@jakarta.apache.org Received: (qmail 27471 invoked by uid 97); 11 Aug 2002 10:30:53 -0000 Mailing-List: contact avalon-cvs-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-cvs@jakarta.apache.org Received: (qmail 27460 invoked by uid 97); 11 Aug 2002 10:30:52 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 11 Aug 2002 10:30:24 -0000 Message-ID: <20020811103024.10586.qmail@icarus.apache.org> From: hammant@apache.org To: jakarta-avalon-site-cvs@apache.org Subject: cvs commit: jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor ActiveMonitor.html FileResource.html Modifiable.html Monitor.html Monitorable.html MonitorableURLSource.html PassiveMonitor.html Resource.html SourceResource.html StreamResource.html package-frame.html package-summary.html package-tree.html X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N hammant 2002/08/11 03:30:24 Added: docs/excalibur/monitor/api allclasses-frame.html deprecated-list.html help-doc.html index-all.html index.html overview-tree.html package-list packages.html serialized-form.html stylesheet.css docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor ActiveMonitor.html FileResource.html Modifiable.html Monitor.html Monitorable.html MonitorableURLSource.html PassiveMonitor.html Resource.html SourceResource.html StreamResource.html package-frame.html package-summary.html package-tree.html Log: Missing docs Revision Changes Path 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/allclasses-frame.html Index: allclasses-frame.html =================================================================== All Classes All Classes
ActiveMonitor
FileResource
Modifiable
Monitor
Monitorable
MonitorableURLSource
PassiveMonitor
Resource
SourceResource
StreamResource
1.1 jakarta-avalon-site/docs/excalibur/monitor/api/deprecated-list.html Index: deprecated-list.html =================================================================== Excalibur Monitor API: Deprecated List

Deprecated API



Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/help-doc.html Index: help-doc.html =================================================================== Excalibur Monitor API: API Help

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors

Class/Interface

Each class, interface, inner class and inner interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Inner Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.



Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/index-all.html Index: index-all.html =================================================================== Excalibur Monitor API: Index
A C F G H L M O P R S T

A

ActiveMonitor - class org.apache.avalon.excalibur.monitor.ActiveMonitor.
The ActiveMonitor is used to actively check a set of resources to see if they have changed.
ActiveMonitor() - Constructor for class org.apache.avalon.excalibur.monitor.ActiveMonitor
 
addPropertyChangeListener(PropertyChangeListener) - Method in class org.apache.avalon.excalibur.monitor.Resource
This is the prefered method of registering a PropertyChangeListender.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class org.apache.avalon.excalibur.monitor.Resource
This is a convenience if you want to expose other properties for the Resource.
addPropertyChangeListenersFrom(Resource) - Method in class org.apache.avalon.excalibur.monitor.Resource
Abstract method to add the PropertyChangeListeners in another Resource to this one.
addResource(Resource) - Method in interface org.apache.avalon.excalibur.monitor.Monitor
Add a resource to monitor.
addResource(Resource) - Method in class org.apache.avalon.excalibur.monitor.PassiveMonitor
Add a resource to monitor.
addResource(Resource) - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
Add a resource to monitor.

C

configure(Configuration) - Method in class org.apache.avalon.excalibur.monitor.PassiveMonitor
 
configure(Configuration) - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
Configure the ActiveMonitor.

F

FileResource - class org.apache.avalon.excalibur.monitor.FileResource.
Managed File based Resource.
FileResource(File) - Constructor for class org.apache.avalon.excalibur.monitor.FileResource
 
FileResource(String) - Constructor for class org.apache.avalon.excalibur.monitor.FileResource
Instantiate the FileResource

G

getResource() - Method in class org.apache.avalon.excalibur.monitor.MonitorableURLSource
Get the corresponding Resource object for monitoring.
getResource() - Method in interface org.apache.avalon.excalibur.monitor.Monitorable
Get the corresponding Resource object for monitoring.
getResource(String) - Method in interface org.apache.avalon.excalibur.monitor.Monitor
Find a monitored resource.
getResource(String) - Method in class org.apache.avalon.excalibur.monitor.PassiveMonitor
Find a monitored resource.
getResource(String) - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
Find a monitored resource.
getResourceAsReader() - Method in class org.apache.avalon.excalibur.monitor.StreamResource
Get the Resource contents as a Reader.
getResourceAsReader() - Method in class org.apache.avalon.excalibur.monitor.FileResource
Sets the resource value with a Writer
getResourceAsReader() - Method in class org.apache.avalon.excalibur.monitor.SourceResource
Sets the resource value with a Writer
getResourceAsStream() - Method in class org.apache.avalon.excalibur.monitor.StreamResource
Get the Resource contents as an InputStream.
getResourceAsStream() - Method in class org.apache.avalon.excalibur.monitor.FileResource
Sets the resource value with an OutputStream
getResourceAsStream() - Method in class org.apache.avalon.excalibur.monitor.SourceResource
Sets the resource value with an OutputStream
getResourceKey() - Method in class org.apache.avalon.excalibur.monitor.Resource
Return the key for the resource.
getSource() - Method in class org.apache.avalon.excalibur.monitor.SourceResource
 

H

hasListeners() - Method in class org.apache.avalon.excalibur.monitor.Resource
This is the preferred method of determining if a Resource has listeners.
hasListeners(String) - Method in class org.apache.avalon.excalibur.monitor.Resource
This is a convenience if you want to expose other properties for the Resource.

L

lastModified() - Method in interface org.apache.avalon.excalibur.monitor.Modifiable
Simply provides the last time the resource has been modified.
lastModified() - Method in class org.apache.avalon.excalibur.monitor.Resource
The time this was last modified.
lastModified() - Method in class org.apache.avalon.excalibur.monitor.FileResource
Determines the last time this resource was modified
lastModified() - Method in class org.apache.avalon.excalibur.monitor.SourceResource
Determines the last time this resource was modified

M

m_eventSupport - Variable in class org.apache.avalon.excalibur.monitor.Resource
 
m_previousModified - Variable in class org.apache.avalon.excalibur.monitor.Resource
 
Modifiable - interface org.apache.avalon.excalibur.monitor.Modifiable.
This interface is used by the Monitor section so that we can test if a resource is modified by an external source.
MODIFIED - Static variable in class org.apache.avalon.excalibur.monitor.Resource
 
Monitor - interface org.apache.avalon.excalibur.monitor.Monitor.
The Monitor is used to actively check a set of resources to see if they have changed.
Monitorable - interface org.apache.avalon.excalibur.monitor.Monitorable.
Describes an object which can be monitored.
MonitorableURLSource - class org.apache.avalon.excalibur.monitor.MonitorableURLSource.
This adds the Monitorable interface to the URLSource.
MonitorableURLSource() - Constructor for class org.apache.avalon.excalibur.monitor.MonitorableURLSource
Constructor

O

org.apache.avalon.excalibur.monitor - package org.apache.avalon.excalibur.monitor
An extensible resource monitor framework and implementation.

P

PassiveMonitor - class org.apache.avalon.excalibur.monitor.PassiveMonitor.
The PassiveMonitor is used to passively check a set of resources to see if they have changed.
PassiveMonitor() - Constructor for class org.apache.avalon.excalibur.monitor.PassiveMonitor
 

R

removeAllPropertyChangeListeners() - Method in class org.apache.avalon.excalibur.monitor.Resource
This cleanup method removes all listeners
removePropertyChangeListener(PropertyChangeListener) - Method in class org.apache.avalon.excalibur.monitor.Resource
This is the prefered method of unregistering a PropertyChangeListender.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class org.apache.avalon.excalibur.monitor.Resource
This is a convenience if you want to expose other properties for the Resource.
removeResource(Resource) - Method in interface org.apache.avalon.excalibur.monitor.Monitor
Remove a monitored resource by reference.
removeResource(Resource) - Method in class org.apache.avalon.excalibur.monitor.PassiveMonitor
Remove a monitored resource by reference.
removeResource(Resource) - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
Remove a monitored resource by reference.
removeResource(String) - Method in interface org.apache.avalon.excalibur.monitor.Monitor
Remove a monitored resource by key.
removeResource(String) - Method in class org.apache.avalon.excalibur.monitor.PassiveMonitor
Remove a monitored resource by key.
removeResource(String) - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
Remove a monitored resource by key.
Resource - class org.apache.avalon.excalibur.monitor.Resource.
Managed Resource.
Resource(String) - Constructor for class org.apache.avalon.excalibur.monitor.Resource
Required constructor.
ROLE - Static variable in interface org.apache.avalon.excalibur.monitor.Monitor
 
run() - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
 

S

setResourceAsStream() - Method in class org.apache.avalon.excalibur.monitor.StreamResource
Set the Resource contents as an OutputStream.
setResourceAsStream() - Method in class org.apache.avalon.excalibur.monitor.FileResource
Sets the resource value with an OutputStream
setResourceAsStream() - Method in class org.apache.avalon.excalibur.monitor.SourceResource
Sets the resource value with an OutputStream
setResourceAsWriter() - Method in class org.apache.avalon.excalibur.monitor.StreamResource
Set the Resource contents as a Writer.
setResourceAsWriter() - Method in class org.apache.avalon.excalibur.monitor.FileResource
Sets the resource value with a Writer
setResourceAsWriter() - Method in class org.apache.avalon.excalibur.monitor.SourceResource
Sets the resource value with a Writer
SourceResource - class org.apache.avalon.excalibur.monitor.SourceResource.
 
SourceResource(Source) - Constructor for class org.apache.avalon.excalibur.monitor.SourceResource
Instantiate the SourceResource
start() - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
 
stop() - Method in class org.apache.avalon.excalibur.monitor.ActiveMonitor
 
streamClosedEvent() - Method in class org.apache.avalon.excalibur.monitor.StreamResource
Automatically handle the streamClosedEvent from the ResourceOutputStream and ResourceWriter.
StreamResource - class org.apache.avalon.excalibur.monitor.StreamResource.
Managed Stream based Resource.
StreamResource(String) - Constructor for class org.apache.avalon.excalibur.monitor.StreamResource
Required constructor.

T

testModifiedAfter(long) - Method in interface org.apache.avalon.excalibur.monitor.Modifiable
Tests if a resource has been modified, and causes the resource to act on that test.
testModifiedAfter(long) - Method in class org.apache.avalon.excalibur.monitor.Resource
Test whether this has been modified since time X

A C F G H L M O P R S T

Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/index.html Index: index.html =================================================================== Excalibur Monitor API <H2> Frame Alert</H2> <P> This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. <BR> Link to <A HREF="org/apache/avalon/excalibur/monitor/package-summary.html">Non-frame version.</A> 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/overview-tree.html Index: overview-tree.html =================================================================== Excalibur Monitor API: Class Hierarchy

Hierarchy For All Packages

Package Hierarchies:
org.apache.avalon.excalibur.monitor

Class Hierarchy

  • class java.lang.Object
    • class org.apache.avalon.framework.logger.AbstractLogEnabled (implements org.apache.avalon.framework.logger.LogEnabled)
    • class org.apache.excalibur.source.impl.AbstractSource (implements org.apache.excalibur.source.Source)
      • class org.apache.excalibur.source.impl.URLSource (implements org.apache.excalibur.source.Source)
    • class org.apache.avalon.excalibur.monitor.Resource (implements org.apache.avalon.excalibur.monitor.Modifiable)

Interface Hierarchy

  • interface org.apache.avalon.framework.component.Component
    • interface org.apache.avalon.excalibur.monitor.Monitor
  • interface org.apache.avalon.excalibur.monitor.Modifiable
  • interface org.apache.avalon.excalibur.monitor.Monitorable


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/package-list Index: package-list =================================================================== org.apache.avalon.excalibur.monitor 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/packages.html Index: packages.html =================================================================== Excalibur Monitor API


The front page has been relocated.Please see:
          Frame version
          Non-frame version.
1.1 jakarta-avalon-site/docs/excalibur/monitor/api/serialized-form.html Index: serialized-form.html =================================================================== Serialized Form

Serialized Form



Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/stylesheet.css Index: stylesheet.css =================================================================== /* Javadoc style sheet */ /* Define colors, fonts and other style attributes here to override the defaults */ /* Page background color */ body { background-color: #FFFFFF } /* Table colors */ .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ .TableRowColor { background: #FFFFFF } /* White */ /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: normal; font-family: normal } .FrameHeadingFont { font-size: normal; font-family: normal } .FrameItemFont { font-size: normal; font-family: normal } /* Example of smaller, sans-serif font in frames */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ /* Navigation bar fonts and colors */ .NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ .NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/ActiveMonitor.html Index: ActiveMonitor.html =================================================================== Excalibur Monitor API: Class ActiveMonitor

org.apache.avalon.excalibur.monitor
Class ActiveMonitor

  java.lang.Object
    |
    +--org.apache.avalon.framework.logger.AbstractLogEnabled
          |
          +--org.apache.avalon.excalibur.monitor.ActiveMonitor
  
All Implemented Interfaces:
Component, Configurable, LogEnabled, Monitor, Runnable, Startable, ThreadSafe

public final class ActiveMonitor
extends AbstractLogEnabled
implements Monitor, Startable, ThreadSafe, Configurable, Runnable

The ActiveMonitor is used to actively check a set of resources to see if they have changed. It will be implemented as a Component, that can be retrieved from the ComponentLocator. It defaults to checking every 1 minute. The configuration looks like this:

     <monitor>
       <thread priority="5" frequency="60000"/>
       <init-resources>
         <-- This entry can be repeated for every resource you want to register immediately -->
  
         <resource key="file:./myfile.html" class="org.apache.avalon.excalibur.monitor.FileResource"/>
       </init-resources>
     </monitor>
   

Version:
$Id: ActiveMonitor.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Berin Loritsch

Fields inherited from interface org.apache.avalon.excalibur.monitor.Monitor
ROLE
 
Constructor Summary
ActiveMonitor()
           
 
Method Summary
 void addResource(Resource resource)
          Add a resource to monitor.
 void configure(Configuration conf)
          Configure the ActiveMonitor.
 Resource getResource(String key)
          Find a monitored resource.
 void removeResource(Resource resource)
          Remove a monitored resource by reference.
 void removeResource(String key)
          Remove a monitored resource by key.
 void run()
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveMonitor

  public ActiveMonitor()
Method Detail

configure

  public final void configure(Configuration conf)
                       throws ConfigurationException
Configure the ActiveMonitor.
Specified by:
configure in interface Configurable

start

  public final void start()
                   throws Exception
Specified by:
start in interface Startable

stop

  public final void stop()
                  throws Exception
Specified by:
stop in interface Startable

addResource

  public final void addResource(Resource resource)
Add a resource to monitor. The resource key referenced in the other interfaces is derived from the resource object.
Specified by:
addResource in interface Monitor

getResource

  public final Resource getResource(String key)
Find a monitored resource. If no resource is available, return null
Specified by:
getResource in interface Monitor

removeResource

  public final void removeResource(String key)
Remove a monitored resource by key.
Specified by:
removeResource in interface Monitor

removeResource

  public final void removeResource(Resource resource)
Remove a monitored resource by reference.
Specified by:
removeResource in interface Monitor

run

  public final void run()
Specified by:
run in interface Runnable


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/FileResource.html Index: FileResource.html =================================================================== Excalibur Monitor API: Class FileResource

org.apache.avalon.excalibur.monitor
Class FileResource

  java.lang.Object
    |
    +--org.apache.avalon.excalibur.monitor.Resource
          |
          +--org.apache.avalon.excalibur.monitor.StreamResource
                |
                +--org.apache.avalon.excalibur.monitor.FileResource
  
All Implemented Interfaces:
Modifiable

public class FileResource
extends StreamResource

Managed File based Resource. This is convenient when you want to dynamically set and get the information from the resource. For instance, the Resource does not need to be actively monitored if all access to the resource goes through this type of Resource. It can notify the change as soon as the Writer or OutputStream has been closed.

Version:
$Id: FileResource.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Berin Loritsch

Fields inherited from class org.apache.avalon.excalibur.monitor.Resource
m_eventSupport, m_previousModified, MODIFIED
 
Constructor Summary
FileResource(File resource)
           
FileResource(String resource)
          Instantiate the FileResource
 
Method Summary
 Reader getResourceAsReader()
          Sets the resource value with a Writer
 InputStream getResourceAsStream()
          Sets the resource value with an OutputStream
 long lastModified()
          Determines the last time this resource was modified
 OutputStream setResourceAsStream()
          Sets the resource value with an OutputStream
 Writer setResourceAsWriter()
          Sets the resource value with a Writer
 
Methods inherited from class org.apache.avalon.excalibur.monitor.StreamResource
streamClosedEvent
 
Methods inherited from class org.apache.avalon.excalibur.monitor.Resource
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenersFrom, getResourceKey, hasListeners, hasListeners, removeAllPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, testModifiedAfter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileResource

  public FileResource(String resource)
               throws Exception
Instantiate the FileResource

FileResource

  public FileResource(File resource)
               throws Exception
Method Detail

lastModified

  public long lastModified()
Determines the last time this resource was modified
Overrides:
lastModified in class Resource

getResourceAsStream

  public InputStream getResourceAsStream()
                                  throws IOException
Sets the resource value with an OutputStream
Overrides:
getResourceAsStream in class StreamResource

getResourceAsReader

  public Reader getResourceAsReader()
                             throws IOException
Sets the resource value with a Writer
Overrides:
getResourceAsReader in class StreamResource

setResourceAsStream

  public OutputStream setResourceAsStream()
                                   throws IOException
Sets the resource value with an OutputStream
Overrides:
setResourceAsStream in class StreamResource

setResourceAsWriter

  public Writer setResourceAsWriter()
                             throws IOException
Sets the resource value with a Writer
Overrides:
setResourceAsWriter in class StreamResource


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/Modifiable.html Index: Modifiable.html =================================================================== Excalibur Monitor API: Interface Modifiable

org.apache.avalon.excalibur.monitor
Interface Modifiable

All Known Implementing Classes:
Resource

public interface Modifiable

This interface is used by the Monitor section so that we can test if a resource is modified by an external source.

Version:
$Id: Modifiable.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Berin Loritsch

Method Summary
 long lastModified()
          Simply provides the last time the resource has been modified.
 void testModifiedAfter(long time)
          Tests if a resource has been modified, and causes the resource to act on that test.
 

Method Detail

testModifiedAfter

  public void testModifiedAfter(long time)
Tests if a resource has been modified, and causes the resource to act on that test. The contract is that the method does its work only when the time passed in is after the last time the resource was modified.

lastModified

  public long lastModified()
Simply provides the last time the resource has been modified.


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/Monitor.html Index: Monitor.html =================================================================== Excalibur Monitor API: Interface Monitor

org.apache.avalon.excalibur.monitor
Interface Monitor

All Superinterfaces:
Component
All Known Implementing Classes:
PassiveMonitor, ActiveMonitor

public interface Monitor
extends Component

The Monitor is used to actively check a set of resources to see if they have changed. It will be implemented as a Component, that can be retrieved from the ComponentLocator.

Version:
$Id: Monitor.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Berin Loritsch

Field Summary
static String ROLE
           
 
Method Summary
 void addResource(Resource resource)
          Add a resource to monitor.
 Resource getResource(String key)
          Find a monitored resource.
 void removeResource(Resource resource)
          Remove a monitored resource by reference.
 void removeResource(String key)
          Remove a monitored resource by key.
 

Field Detail

ROLE

  public static final String ROLE
Method Detail

addResource

  public void addResource(Resource resource)
Add a resource to monitor. The resource key referenced in the other interfaces is derived from the resource object.

getResource

  public Resource getResource(String key)
Find a monitored resource. If no resource is available, return null

removeResource

  public void removeResource(String key)
Remove a monitored resource by key.

removeResource

  public void removeResource(Resource resource)
Remove a monitored resource by reference.


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/Monitorable.html Index: Monitorable.html =================================================================== Excalibur Monitor API: Interface Monitorable

org.apache.avalon.excalibur.monitor
Interface Monitorable

All Known Implementing Classes:
MonitorableURLSource

public interface Monitorable

Describes an object which can be monitored.

Author:
Carsten Ziegeler

Method Summary
 Resource getResource()
          Get the corresponding Resource object for monitoring.
 

Method Detail

getResource

  public Resource getResource()
                       throws Exception
Get the corresponding Resource object for monitoring.


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/MonitorableURLSource.html Index: MonitorableURLSource.html =================================================================== Excalibur Monitor API: Class MonitorableURLSource

org.apache.avalon.excalibur.monitor
Class MonitorableURLSource

  java.lang.Object
    |
    +--org.apache.excalibur.source.impl.AbstractSource
          |
          +--org.apache.excalibur.source.impl.URLSource
                |
                +--org.apache.avalon.excalibur.monitor.MonitorableURLSource
  
All Implemented Interfaces:
Monitorable, org.apache.excalibur.source.Source

public class MonitorableURLSource
extends org.apache.excalibur.source.impl.URLSource
implements Monitorable

This adds the Monitorable interface to the URLSource.

Version:
CVS $Revision: 1.1 $ $Date: 2002/08/11 10:30:23 $
Author:
Carsten Ziegeler

Fields inherited from class org.apache.excalibur.source.impl.URLSource
cachedLastModificationDate, cachedValidity, connection, file, FILE, HTTP_METHOD, isPost, parameters, REQUEST_PARAMETERS, url
 
Fields inherited from class org.apache.excalibur.source.impl.AbstractSource
contentLength, gotInfos, lastModificationDate, systemId
 
Constructor Summary
MonitorableURLSource()
          Constructor
 
Method Summary
 Resource getResource()
          Get the corresponding Resource object for monitoring.
 
Methods inherited from class org.apache.excalibur.source.impl.URLSource
discardValidity, getInfos, getInputStream, getUserInfo, getValidity, init
 
Methods inherited from class org.apache.excalibur.source.impl.AbstractSource
checkInfos, getContentLength, getLastModified, getMimeType, getParameter, getParameterAsLong, getParameterNames, getSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.excalibur.source.Source
getContentLength, getLastModified, getMimeType, getParameter, getParameterAsLong, getParameterNames, getSystemId
 

Constructor Detail

MonitorableURLSource

  public MonitorableURLSource()
Constructor
Method Detail

getResource

  public Resource getResource()
                       throws Exception
Get the corresponding Resource object for monitoring.
Specified by:
getResource in interface Monitorable


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/PassiveMonitor.html Index: PassiveMonitor.html =================================================================== Excalibur Monitor API: Class PassiveMonitor

org.apache.avalon.excalibur.monitor
Class PassiveMonitor

  java.lang.Object
    |
    +--org.apache.avalon.framework.logger.AbstractLogEnabled
          |
          +--org.apache.avalon.excalibur.monitor.PassiveMonitor
  
All Implemented Interfaces:
Component, Configurable, LogEnabled, Monitor, ThreadSafe

public final class PassiveMonitor
extends AbstractLogEnabled
implements Monitor, ThreadSafe, Configurable

The PassiveMonitor is used to passively check a set of resources to see if they have changed. It will be implemented as a Component, that can be retrieved from the ComponentLocator. It defaults to checking every 1 minute. The configuration looks like this:

     <monitor>
       <init-resources>
         <-- This entry can be repeated for every resource you want to register immediately -->
  
         <resource key="file:./myfile.html" class="org.apache.avalon.excalibur.monitor.FileMonitor"/>
       </init-resources>
     </monitor>
   

Version:
$Id: PassiveMonitor.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Berin Loritsch

Fields inherited from interface org.apache.avalon.excalibur.monitor.Monitor
ROLE
 
Constructor Summary
PassiveMonitor()
           
 
Method Summary
 void addResource(Resource resource)
          Add a resource to monitor.
 void configure(Configuration conf)
           
 Resource getResource(String key)
          Find a monitored resource.
 void removeResource(Resource resource)
          Remove a monitored resource by reference.
 void removeResource(String key)
          Remove a monitored resource by key.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PassiveMonitor

  public PassiveMonitor()
Method Detail

configure

  public final void configure(Configuration conf)
                       throws ConfigurationException
Specified by:
configure in interface Configurable

addResource

  public final void addResource(Resource resource)
Add a resource to monitor. The resource key referenced in the other interfaces is derived from the resource object.
Specified by:
addResource in interface Monitor

getResource

  public final Resource getResource(String key)
Find a monitored resource. If no resource is available, return null
Specified by:
getResource in interface Monitor

removeResource

  public final void removeResource(String key)
Remove a monitored resource by key.
Specified by:
removeResource in interface Monitor

removeResource

  public final void removeResource(Resource resource)
Remove a monitored resource by reference.
Specified by:
removeResource in interface Monitor


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/Resource.html Index: Resource.html =================================================================== Excalibur Monitor API: Class Resource

org.apache.avalon.excalibur.monitor
Class Resource

  java.lang.Object
    |
    +--org.apache.avalon.excalibur.monitor.Resource
  
All Implemented Interfaces:
Modifiable
Direct Known Subclasses:
StreamResource

public abstract class Resource
extends Object
implements Modifiable

Managed Resource. All resources must have a constructor that takes a String and converts it to the needed format (i.e. File). A Managed Resource in the Monitor section has only one property needed to be changed: last modified. The property name for the last modified event will be the same as the resource key. Implementations may add additional properties, but for most instances the last modified property will be enough.

Version:
$Id: Resource.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Berin Loritsch

Field Summary
protected  PropertyChangeSupport m_eventSupport
           
protected  long m_previousModified
           
protected static String MODIFIED
           
 
Constructor Summary
Resource(String location)
          Required constructor.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          This is the prefered method of registering a PropertyChangeListender.
protected  void addPropertyChangeListener(String property, PropertyChangeListener listener)
          This is a convenience if you want to expose other properties for the Resource.
protected  void addPropertyChangeListenersFrom(Resource other)
          Abstract method to add the PropertyChangeListeners in another Resource to this one.
 String getResourceKey()
          Return the key for the resource.
 boolean hasListeners()
          This is the preferred method of determining if a Resource has listeners.
protected  boolean hasListeners(String property)
          This is a convenience if you want to expose other properties for the Resource.
abstract  long lastModified()
          The time this was last modified.
protected  void removeAllPropertyChangeListeners()
          This cleanup method removes all listeners
 void removePropertyChangeListener(PropertyChangeListener listener)
          This is the prefered method of unregistering a PropertyChangeListender.
protected  void removePropertyChangeListener(String property, PropertyChangeListener listener)
          This is a convenience if you want to expose other properties for the Resource.
 void testModifiedAfter(long time)
          Test whether this has been modified since time X
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODIFIED

  protected static final String MODIFIED

m_eventSupport

  protected PropertyChangeSupport m_eventSupport

m_previousModified

  protected long m_previousModified
Constructor Detail

Resource

  public Resource(String location)
           throws Exception
Required constructor. The String location is transformed by the specific resource monitor. For instance, a FileResource will be able to convert a string representation of a path to the proper File object.
Method Detail

getResourceKey

  public final String getResourceKey()
Return the key for the resource.

lastModified

  public abstract long lastModified()
The time this was last modified.
Specified by:
lastModified in interface Modifiable

testModifiedAfter

  public void testModifiedAfter(long time)
Test whether this has been modified since time X
Specified by:
testModifiedAfter in interface Modifiable

addPropertyChangeListenersFrom

  protected void addPropertyChangeListenersFrom(Resource other)
Abstract method to add the PropertyChangeListeners in another Resource to this one.

addPropertyChangeListener

  public final void addPropertyChangeListener(PropertyChangeListener listener)
This is the prefered method of registering a PropertyChangeListender. It automatically registers the listener for the last modified event.

addPropertyChangeListener

  protected void addPropertyChangeListener(String property,
                                           PropertyChangeListener listener)
This is a convenience if you want to expose other properties for the Resource. It is protected now, but you may override it with public access later.

removePropertyChangeListener

  public final void removePropertyChangeListener(PropertyChangeListener listener)
This is the prefered method of unregistering a PropertyChangeListender. It automatically registers the listener for the last modified event.

removePropertyChangeListener

  protected void removePropertyChangeListener(String property,
                                              PropertyChangeListener listener)
This is a convenience if you want to expose other properties for the Resource. It is protected now, but you may override it with public access later.

hasListeners

  public final boolean hasListeners()
This is the preferred method of determining if a Resource has listeners.

removeAllPropertyChangeListeners

  protected void removeAllPropertyChangeListeners()
This cleanup method removes all listeners

hasListeners

  protected boolean hasListeners(String property)
This is a convenience if you want to expose other properties for the Resource. It is protected now, but you may override it with public access later.


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/SourceResource.html Index: SourceResource.html =================================================================== Excalibur Monitor API: Class SourceResource

org.apache.avalon.excalibur.monitor
Class SourceResource

  java.lang.Object
    |
    +--org.apache.avalon.excalibur.monitor.Resource
          |
          +--org.apache.avalon.excalibur.monitor.StreamResource
                |
                +--org.apache.avalon.excalibur.monitor.SourceResource
  
All Implemented Interfaces:
Modifiable

public final class SourceResource
extends StreamResource

Version:
$Id: SourceResource.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Carsten Ziegeler

Fields inherited from class org.apache.avalon.excalibur.monitor.Resource
m_eventSupport, m_previousModified, MODIFIED
 
Constructor Summary
SourceResource(org.apache.excalibur.source.Source source)
          Instantiate the SourceResource
 
Method Summary
 Reader getResourceAsReader()
          Sets the resource value with a Writer
 InputStream getResourceAsStream()
          Sets the resource value with an OutputStream
 org.apache.excalibur.source.Source getSource()
           
 long lastModified()
          Determines the last time this resource was modified
 OutputStream setResourceAsStream()
          Sets the resource value with an OutputStream
 Writer setResourceAsWriter()
          Sets the resource value with a Writer
 
Methods inherited from class org.apache.avalon.excalibur.monitor.StreamResource
streamClosedEvent
 
Methods inherited from class org.apache.avalon.excalibur.monitor.Resource
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenersFrom, getResourceKey, hasListeners, hasListeners, removeAllPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, testModifiedAfter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceResource

  public SourceResource(org.apache.excalibur.source.Source source)
                 throws Exception
Instantiate the SourceResource
Method Detail

lastModified

  public long lastModified()
Determines the last time this resource was modified
Overrides:
lastModified in class Resource

getResourceAsStream

  public InputStream getResourceAsStream()
                                  throws IOException
Sets the resource value with an OutputStream
Overrides:
getResourceAsStream in class StreamResource

getResourceAsReader

  public Reader getResourceAsReader()
                             throws IOException
Sets the resource value with a Writer
Overrides:
getResourceAsReader in class StreamResource

setResourceAsStream

  public OutputStream setResourceAsStream()
                                   throws IOException
Sets the resource value with an OutputStream
Overrides:
setResourceAsStream in class StreamResource

setResourceAsWriter

  public Writer setResourceAsWriter()
                             throws IOException
Sets the resource value with a Writer
Overrides:
setResourceAsWriter in class StreamResource

getSource

  public org.apache.excalibur.source.Source getSource()


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/StreamResource.html Index: StreamResource.html =================================================================== Excalibur Monitor API: Class StreamResource

org.apache.avalon.excalibur.monitor
Class StreamResource

  java.lang.Object
    |
    +--org.apache.avalon.excalibur.monitor.Resource
          |
          +--org.apache.avalon.excalibur.monitor.StreamResource
  
All Implemented Interfaces:
Modifiable
Direct Known Subclasses:
FileResource, SourceResource

public abstract class StreamResource
extends Resource

Managed Stream based Resource. This is convenient when you want to dynamically set and get the information from the resource. For instance, the Resource does not need to be actively monitored if all access to the resource goes through this type of Resource. It can notify the change as soon as the Writer or OutputStream has been closed.

Version:
$Id: StreamResource.html,v 1.1 2002/08/11 10:30:23 hammant Exp $
Author:
Berin Loritsch

Fields inherited from class org.apache.avalon.excalibur.monitor.Resource
m_eventSupport, m_previousModified, MODIFIED
 
Constructor Summary
StreamResource(String location)
          Required constructor.
 
Method Summary
abstract  Reader getResourceAsReader()
          Get the Resource contents as a Reader.
abstract  InputStream getResourceAsStream()
          Get the Resource contents as an InputStream.
abstract  OutputStream setResourceAsStream()
          Set the Resource contents as an OutputStream.
abstract  Writer setResourceAsWriter()
          Set the Resource contents as a Writer.
protected  void streamClosedEvent()
          Automatically handle the streamClosedEvent from the ResourceOutputStream and ResourceWriter.
 
Methods inherited from class org.apache.avalon.excalibur.monitor.Resource
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenersFrom, getResourceKey, hasListeners, hasListeners, lastModified, removeAllPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, testModifiedAfter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamResource

  public StreamResource(String location)
                 throws Exception
Required constructor. The String location is transformed by the specific resource monitor. For instance, a FileResource will be able to convert a string representation of a path to the proper File object.
Method Detail

getResourceAsStream

  public abstract InputStream getResourceAsStream()
                                           throws IOException
Get the Resource contents as an InputStream.

getResourceAsReader

  public abstract Reader getResourceAsReader()
                                      throws IOException
Get the Resource contents as a Reader.

setResourceAsStream

  public abstract OutputStream setResourceAsStream()
                                            throws IOException
Set the Resource contents as an OutputStream.

setResourceAsWriter

  public abstract Writer setResourceAsWriter()
                                      throws IOException
Set the Resource contents as a Writer.

streamClosedEvent

  protected void streamClosedEvent()
Automatically handle the streamClosedEvent from the ResourceOutputStream and ResourceWriter.


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/package-frame.html Index: package-frame.html =================================================================== Excalibur Monitor API: Package org.apache.avalon.excalibur.monitor org.apache.avalon.excalibur.monitor
Interfaces 
Modifiable
Monitor
Monitorable
Classes 
ActiveMonitor
FileResource
MonitorableURLSource
PassiveMonitor
Resource
SourceResource
StreamResource
1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/package-summary.html Index: package-summary.html =================================================================== Excalibur Monitor API: Package org.apache.avalon.excalibur.monitor

Package org.apache.avalon.excalibur.monitor

An extensible resource monitor framework and implementation.

See:
          Description

Interface Summary
Modifiable This interface is used by the Monitor section so that we can test if a resource is modified by an external source.
Monitor The Monitor is used to actively check a set of resources to see if they have changed.
Monitorable Describes an object which can be monitored.
 

Class Summary
ActiveMonitor The ActiveMonitor is used to actively check a set of resources to see if they have changed.
FileResource Managed File based Resource.
MonitorableURLSource This adds the Monitorable interface to the URLSource.
PassiveMonitor The PassiveMonitor is used to passively check a set of resources to see if they have changed.
Resource Managed Resource.
SourceResource  
StreamResource Managed Stream based Resource.
 

Package org.apache.avalon.excalibur.monitor Description

An extensible resource monitor framework and implementation.

Introduction

The org.apache.avalon.excalibur.monitor package contains interfaces and classes for resource monitoring. The design is sufficiently modular to allow for different implementations of the monitoring strategies, and resource types. A FileResource is included for your convenience.

In order to receive notification that a resource has been modified, you must implement the java.beans.PropertyChangeListener interface. You will be notified with a java.beans.PropertyChangeEvent where the property name is "last-modified". Because the PropertyChangeEvent works with Objects, you must recast the Object returned into a java.lang.Long object. From there you can derive the previously modified time as well as the current modified time.



Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. 1.1 jakarta-avalon-site/docs/excalibur/monitor/api/org/apache/avalon/excalibur/monitor/package-tree.html Index: package-tree.html =================================================================== Excalibur Monitor API: org.apache.avalon.excalibur.monitor Class Hierarchy

Hierarchy For Package org.apache.avalon.excalibur.monitor

Class Hierarchy

  • class java.lang.Object
    • class org.apache.avalon.framework.logger.AbstractLogEnabled (implements org.apache.avalon.framework.logger.LogEnabled)
    • class org.apache.excalibur.source.impl.AbstractSource (implements org.apache.excalibur.source.Source)
      • class org.apache.excalibur.source.impl.URLSource (implements org.apache.excalibur.source.Source)
    • class org.apache.avalon.excalibur.monitor.Resource (implements org.apache.avalon.excalibur.monitor.Modifiable)

Interface Hierarchy

  • interface org.apache.avalon.framework.component.Component
    • interface org.apache.avalon.excalibur.monitor.Monitor
  • interface org.apache.avalon.excalibur.monitor.Modifiable
  • interface org.apache.avalon.excalibur.monitor.Monitorable


Copyright � 2000-2002 Apache Jakarta Project. All Rights Reserved. -- To unsubscribe, e-mail: For additional commands, e-mail: