Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.syndication.propono.atom.server
Class AtomHandlerFactory

    java.lang.Object
      com.sun.syndication.propono.atom.server.AtomHandlerFactory

Direct Known Subclasses:
  FileBasedAtomHandlerFactory

    public abstract class AtomHandlerFactory

extends Object

Defines a factory that enables the `AtomServlet` to obtain an `AtomHandler` that handles an Atom request.

To create your own Atom protocol implementation you must sub-class this class with your own factory that is capable of creating instances of your `AtomHandler` impementation.

Constructor Summary
`protected` | `AtomHandlerFactory()`

Method Summary
`abstract AtomHandler` | `newAtomHandler(HttpServletRequest req, HttpServletResponse res)` Creates a new instance of a `AtomHandler` using the currently configured parameters.
`static AtomHandlerFactory` | `newInstance()` Obtain a new instance of a `AtomHandlerFactory`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AtomHandlerFactory

    protected AtomHandlerFactory()

Method Detail

### newInstance

    public static AtomHandlerFactory newInstance()

  Obtain a new instance of a `AtomHandlerFactory`. This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the `AtomHandlerFactory` implementation class to load:
  - Use the `com.sun.syndication.propono.atom.server.AtomHandlerFactory` system property.
  - Use the properties file "/propono.properties" in the classpath. This configuration file is in standard `java.util.Properties` format and contains the fully qualified name of the implementation class with the key being the system property defined above. The propono.properties file is read only once by Propono and it's values are then cached for future use. If the file does not exist when the first attempt is made to read from it, no further attempts are made to check for its existence. It is not possible to change the value of any property in propono.properties after it has been read for the first time.
  - If not available, to determine the classname. The Services API will look for a classname in the file: `META-INF/services/com.sun.syndication.AtomHandlerFactory` in jars available to the runtime.
  - Platform default `AtomHandlerFactory` instance.
  Once an application has obtained a reference to a `AtomHandlerFactory` it can use the factory to configure and obtain parser instances.

  Returns:
    New instance of a `AtomHandlerFactory`
  Throws:
    `FactoryConfigurationError` - if the implementation is not available or cannot be instantiated.

### newAtomHandler

    public abstract AtomHandler newAtomHandler(HttpServletRequest req,
                                               HttpServletResponse res)

  Creates a new instance of a `AtomHandler` using the currently configured parameters.

  Returns:
    A new instance of a AtomHandler.
  Throws:
    `AtomConfigurationException` - if a AtomHandler cannot be created which satisfies the configuration requested.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD