jpl.mipl.mdms.FileService.komodo.client.handlers
Class AbstractFileEventHandler

java.lang.Object
  extended by jpl.mipl.mdms.FileService.komodo.client.handlers.AbstractFileEventHandler
All Implemented Interfaces:
FileEventHandler
Direct Known Subclasses:
EchoFileHandler, MSLRemoteSubscriptionHandler

public abstract class AbstractFileEventHandler
extends Object
implements FileEventHandler

Purpose: Default implementation for some methods of the FileEventHandler. Subclasses must implement the handleEvent() and handleError() methods.

   Copyright 2008, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2008.
   
 ============================================================================
 Modification History :
 ----------------------

 Date              Who              What
 ----------------------------------------------------------------------------
 07/21/2008        Nick             Initial Release
 ============================================================================
 

Version:
$Id: AbstractFileEventHandler.java,v 1.4 2008/09/19 00:47:06 ntt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Field Summary
protected  String _classname
          Class name of this handler
protected  FileEventsContext _context
          Context reference
protected  String _id
          Id of this handler
protected  FileEventHandlerInfo _metadata
           
protected  String _name
          Name of this handler
protected  Properties _properties
          Properties for this handler
 
Constructor Summary
AbstractFileEventHandler()
           
 
Method Summary
 void close()
           
 String getClassname()
          Returns the description of this handler
 String getDescription()
          Returns the description of this handler
 String getId()
          Returns the id of this handler
 String getName()
          Returns the name of this handler
 String getProperty(String propertyName)
          Returns the value associated with a property name, null if not defined
 String getVersion()
          Returns the version of this handler
 void initialize(FileEventsContext context, FileEventHandlerInfo metadata)
          Initializes handler from contents of a DOM element.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jpl.mipl.mdms.FileService.komodo.client.handlers.FileEventHandler
errorOccurred, eventOccurred
 

Field Detail

_metadata

protected FileEventHandlerInfo _metadata

_name

protected String _name
Name of this handler


_id

protected String _id
Id of this handler


_classname

protected String _classname
Class name of this handler


_properties

protected Properties _properties
Properties for this handler


_context

protected FileEventsContext _context
Context reference

Constructor Detail

AbstractFileEventHandler

public AbstractFileEventHandler()
Method Detail

initialize

public void initialize(FileEventsContext context,
                       FileEventHandlerInfo metadata)
                throws HandlerException
Description copied from interface: FileEventHandler
Initializes handler from contents of a DOM element.

Specified by:
initialize in interface FileEventHandler
Throws:
HandlerException

getName

public String getName()
Returns the name of this handler

Specified by:
getName in interface FileEventHandler
Returns:
Handler name

getId

public String getId()
Returns the id of this handler

Specified by:
getId in interface FileEventHandler
Returns:
Handler id

getClassname

public String getClassname()
Returns the description of this handler

Returns:
Handler description

getDescription

public String getDescription()
Returns the description of this handler

Specified by:
getDescription in interface FileEventHandler
Returns:
Handler description

getVersion

public String getVersion()
Returns the version of this handler

Specified by:
getVersion in interface FileEventHandler
Returns:
Handler version

getProperty

public String getProperty(String propertyName)
Description copied from interface: FileEventHandler
Returns the value associated with a property name, null if not defined

Specified by:
getProperty in interface FileEventHandler
Returns:
propertyName Name of the property

toString

public String toString()
Overrides:
toString in class Object

close

public void close()
Specified by:
close in interface FileEventHandler