OracleAS Syndication Services API Reference
10g (9.0.4)

Part No. B10399-01

oracle.syndicate.client.handler
Interface SAXPackageHandler

All Superinterfaces:
SAXHandler
All Known Implementing Classes:
PushSAXPackageHandler, FileSAXPackageHandler

public interface SAXPackageHandler
extends SAXHandler

Defines the methods to be implemented by those classes which will process packages delieved by syndicators. Oracle Syndication Services parses incoming messages using a XML SAX parser. The SAX parser is an event-based model to parse XML documents avoiding to load the whole document in memory. SAXPackageHandler is an abstraction over the SAX APIs customized for an event-based parsing of syndication content packages. Content packages start with a package declaration and then a set of items. Items can be grouped in item groups. The following APIs will be invoked by the SyndicateConnection whenever the corresponding package entities are found during the SAX package parsing.

Since:
release specific (what release of product did this appear in)

Method Summary
 void endItem(SyndicatePackage pkg, Item itm)
          Called when the end a package item is encountered.
 void endItemGroup(SyndicatePackage pkg, ItemGroup itmgrp)
          Called when the end a package item group is encountered.
 void endPackage(SyndicatePackage pkg)
          Called when the end of a content package is encountered.
 void error(SyndicatePackage pkg, SyndicateException e)
          Called when an error is encoutered while parsing the content package
 void itemCharacters(SyndicatePackage pkg, Item itm, char[] buff, int iStart, int iLength)
          Called when a package item content is encountered.
 void itemRef(SyndicatePackage pkg, ItemRef itmref)
          Called when a package item reference is encountered.
 void itemRemove(SyndicatePackage pkg, ItemRemove itmrm)
          Called when a package item remove is encountered.
 void startItem(SyndicatePackage pkg, Item itm)
          Called when a new beginning of a package item is encountered.
 void startItemGroup(SyndicatePackage pkg, ItemGroup itmgrp)
          Called when the beginning a package item group is encountered.
 void startPackage(SyndicatePackage pkg)
          Called when a new beginning of a content package is encountered.

 

Method Detail

startPackage

public void startPackage(SyndicatePackage pkg)
                  throws SyndicateException
Called when a new beginning of a content package is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata

startItem

public void startItem(SyndicatePackage pkg,
Item itm)
               throws SyndicateException
Called when a new beginning of a package item is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata
Item - allows for accessing the item metadata

itemCharacters

public void itemCharacters(SyndicatePackage pkg,
Item itm,
                           char[] buff,
                           int iStart,
                           int iLength)
                    throws SyndicateException
Called when a package item content is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata
Item - allows for accessing the item metadata
buff, - buffer containing the item content
buff, - start index in buff for the beginnign of the buffer content
buff, - length of the buffer content

endItem

public void endItem(SyndicatePackage pkg,
Item itm)
             throws SyndicateException
Called when the end a package item is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata
Item - allows for accessing the item metadata

startItemGroup

public void startItemGroup(SyndicatePackage pkg,
ItemGroup itmgrp)
                    throws SyndicateException
Called when the beginning a package item group is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata
ItemGroup - allows for accessing the item group metadata

endItemGroup

public void endItemGroup(SyndicatePackage pkg,
ItemGroup itmgrp)
                  throws SyndicateException
Called when the end a package item group is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata
ItemGroup - allows for accessing the item group metadata

itemRemove

public void itemRemove(SyndicatePackage pkg,
ItemRemove itmrm)
                throws SyndicateException
Called when a package item remove is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata
ItemRemove - allows for accessing the item remove metadata

itemRef

public void itemRef(SyndicatePackage pkg,
ItemRef itmref)
             throws SyndicateException
Called when a package item reference is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata
ItemRef - allows for accessing the item reference metadata

endPackage

public void endPackage(SyndicatePackage pkg)
                throws SyndicateException
Called when the end of a content package is encountered.
Parameters:
SyndicatePackage - allows for accessing package metadata

error

public void error(SyndicatePackage pkg,
SyndicateException e)
Called when an error is encoutered while parsing the content package
Parameters:
SyndicatePackage - allows for accessing package metadata
SyndicateException - the exception raised by during the package content parsing

Copyright © 2001, 2003, Oracle. All rights reserved.

Copyright © 2001, 2003, Oracle. All rights reserved.