org.jvending.provisioning.stocking.handler
Class StockingHandler

java.lang.Object
  extended by org.jvending.provisioning.stocking.handler.StockingHandler

public abstract class StockingHandler
extends java.lang.Object

Provides a way to preprocess PAR files prior to stocking them within the BundleRepository. The developer is required to extend the class and implement the addParFile method. For the provisioning framework to use this handler, a reference must be defined within the stocking-handlers.xml file. This is the source for stocking PAR files, which is then followed by the StockingFilters preprocessing and ends with the DataSink.

Since:
2.0.0
Author:
Shane Isbell

Field Summary
protected  StockingHandlerConfig stockingHandlerConfig
           
 
Constructor Summary
StockingHandler()
           
 
Method Summary
abstract  long addParFile(java.io.InputStream inputStream, ProviderContext providerContext)
          Preprocesses a PAR file.
 void destroy()
          Called when the provisioning framework takes the handler out of service.
 StockingHandlerConfig getStockingHandlerConfig()
          Accessor for StockingHandlerConfig
 void init(StockingHandlerConfig stockingHandlerConfig)
          Called when the provisioning framework puts the handler in service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stockingHandlerConfig

protected StockingHandlerConfig stockingHandlerConfig
Constructor Detail

StockingHandler

public StockingHandler()
Method Detail

addParFile

public abstract long addParFile(java.io.InputStream inputStream,
                                ProviderContext providerContext)
                         throws java.io.IOException
Preprocesses a PAR file.

Parameters:
inputStream - PAR file
Returns:
parId - this will be parId that is returned from the underlying DataSink, which is typically the BundleRepository
Throws:
java.io.IOException

destroy

public void destroy()
             throws StockingHandlerException
Called when the provisioning framework takes the handler out of service.

Throws:
StockingHandlerException

init

public void init(StockingHandlerConfig stockingHandlerConfig)
          throws StockingHandlerException
Called when the provisioning framework puts the handler in service.

Parameters:
stockingHandlerConfig -
Throws:
StockingHandlerException

getStockingHandlerConfig

public StockingHandlerConfig getStockingHandlerConfig()
Accessor for StockingHandlerConfig

Returns:
StockingHandlerConfig


Copyright 2006 null. All Rights Reserved.