org.openxml.x3p
Interface PublisherCreator


public abstract interface PublisherCreator

Interface for a publisher creator. Creators are registered with the publisher factory and asked to create a publisher for the specified target. A creator should only return a publisher if it supports the requested target, otherwise it must return null.

isSupported(org.openxml.x3p.PublisherTarget) asks the creator if it can create a new publisher for a specific target, and listTargets() lists the target classes supported by this creator.

Version:
$Revision: 1.2 $ $Date: 1999/04/12 06:12:43 $
Author:
Assaf Arkin
See Also:
Publisher, PublisherFactory

Method Summary
 Publisher createPublisher(PublisherTarget target)
          Called to create a new publisher for the specified target.
 boolean isSupported(PublisherTarget target)
          Returns true if a publisher can be created for the specified target.
 java.lang.Class[] listTargets()
          Returns a list of supported publisher targets.
 

Method Detail

createPublisher

public Publisher createPublisher(PublisherTarget target)
                          throws java.io.IOException
Called to create a new publisher for the specified target. If no suitable publisher can be created, this method should simply return null. If a publisher is returned it will be used.
Parameters:
target - The publisher target
Returns:
New publisher, or null

isSupported

public boolean isSupported(PublisherTarget target)
Returns true if a publisher can be created for the specified target. If this method returns true, createPublisher(org.openxml.x3p.PublisherTarget) should return such a publisher.
Parameters:
target - The publisher target
Returns:
True is publisher can be created

listTargets

public java.lang.Class[] listTargets()
Returns a list of supported publisher targets. The list is returned as an array of classes (non-abstract) extending PublisherTarget. Any of these classes can be constructed and used to invoke this publisher. If the list is empty, null may be returned.
Returns:
Array of target classes