NetCharts Server

chartworks.es.plugin
Class NDSPlugIn

java.lang.Object
  |
  +--chartworks.es.plugin.NDSPlugIn
Direct Known Subclasses:
NDSPlugInAdapter, StatsPlugIn

public abstract class NDSPlugIn
extends java.lang.Object

This class is the super-class of all PlugIn classes. It provides a common interface to the PlugIn subclasses and it maintains the registry of all existing PlugIn classes.

See Also:
NDSPlugInObserver

Constructor Summary
NDSPlugIn(java.lang.String name)
          Standard constructor for a NDSPlugIn.
 
Method Summary
 void addListingEntry(java.net.URL fileBase, java.util.Hashtable serverParams, java.io.PrintStream ps, java.lang.String url)
          Add additional information to the listing for this file as seen when a GET on a directory is performed.
 void addObserver(NDSPlugInObserver observer)
          Add an NDSPlugInObserver.
static NDSPlugIn createPlugIn(java.lang.String className, java.lang.String name)
          Create an instance of the specified PlugIn.
abstract  java.lang.String getContentType(java.net.URL fileBase, java.util.Hashtable serverParams, java.util.Hashtable clientParams)
          Return the Content-Type of this NDSPlugIn.
abstract  byte[] getData(java.net.URL fileBase, java.util.Hashtable serverParams, java.util.Hashtable clientParams)
          Return the NDSPlugIn data given the specified parameters.
static NDSPlugIn getPlugIn(java.lang.String className, java.lang.String name)
          Get the PlugIn object with the specified class and name
 boolean hasNewData(netcharts.util.NFDate since)
          Return whether the PlugIn has new data since the given date.
 void removeObserver(NDSPlugInObserver observer)
          Remove an NDSPlugInObserver.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NDSPlugIn

public NDSPlugIn(java.lang.String name)
Standard constructor for a NDSPlugIn.
Parameters:
name - The name of the NDSPlugIn specified in the .nds file.
Method Detail

getPlugIn

public static NDSPlugIn getPlugIn(java.lang.String className,
                                  java.lang.String name)
Get the PlugIn object with the specified class and name
Parameters:
className - The name of the Java class that represents the PlugIn.
name - The name of the PlugIn as found in the .nds file.
Returns:
The PlugIn object with the given class name and NDS name or null if the specified PlugIn does not exist.

createPlugIn

public static NDSPlugIn createPlugIn(java.lang.String className,
                                     java.lang.String name)
Create an instance of the specified PlugIn.
Parameters:
className - The name of the Java class that represents the PlugIn.
name - The name of the PlugIn as found in the .nds file.
Returns:
The PlugIn object with the given class name and NDS name or null if the specified PlugIn could not be created.

hasNewData

public boolean hasNewData(netcharts.util.NFDate since)
Return whether the PlugIn has new data since the given date.
Parameters:
since - Specifies the time to use as the start date.
Returns:
True if the PlugIn has new data, false otherwise.

getData

public abstract byte[] getData(java.net.URL fileBase,
                               java.util.Hashtable serverParams,
                               java.util.Hashtable clientParams)
Return the NDSPlugIn data given the specified parameters.
Parameters:
fileBase - The directory from which the .nds file was loaded.
serverParams - Hashtable of name/value pairs.
clientParams - Hashtable of name/value pairs.
Returns:
An array of bytes representing the data.

getContentType

public abstract java.lang.String getContentType(java.net.URL fileBase,
                                                java.util.Hashtable serverParams,
                                                java.util.Hashtable clientParams)
Return the Content-Type of this NDSPlugIn.
Parameters:
fileBase - The directory from which the .nds file was loaded.
serverParams - Hashtable of name/value pairs.
clientParams - Hashtable of name/value pairs.
Returns:
A MimeType representing the Data received from getData.

addListingEntry

public void addListingEntry(java.net.URL fileBase,
                            java.util.Hashtable serverParams,
                            java.io.PrintStream ps,
                            java.lang.String url)
Add additional information to the listing for this file as seen when a GET on a directory is performed. Defaults to writing: <a href='url'>name</a>
Parameters:
fileBase - The directory from which the .nds file was loaded.
serverParams - Hashtable of name/value pairs.
ps - The PrintStream to write the listing on.
url - The server location of the .nds file on which this listing is to be based.

addObserver

public void addObserver(NDSPlugInObserver observer)
Add an NDSPlugInObserver.
Parameters:
observer - The NDSPlugInObserver to add.

removeObserver

public void removeObserver(NDSPlugInObserver observer)
Remove an NDSPlugInObserver.
Parameters:
observer - The NDSPlugInObserver to remove.

NetCharts Server


Visual Mining, Inc.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2004
All Rights Reserved.

NetCharts Server TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Aug 3, 2004