org.neuclear.ledger.servlets
Class ServletLedgerFactory

java.lang.Object
  extended byorg.neuclear.ledger.servlets.ServletLedgerFactory

public final class ServletLedgerFactory
extends java.lang.Object

Used to create Signers from signers configuration parameters. It keeps a cache of Signers with similar parameters. Thus if you have several Servlets with the same keystore parameters they will use the same instance of Signer

The Configuration parameters are as follows:

parameter nameparameter value
keystoreThe location of the JCE KeyStore. Defaults to the file .keystore in the users home directory If you specify test the built in Test keystore will be used.
serviceidThe main service ID of the service. Ie. neu://superbux.com/ecurrency. This is only required (and used) if you set keeppassphrase (see below)
passphraseagentThe type of passphraseagent to use. Valid options are signers, gui(default) and console
keeppassphraseThis asks for the service passphrase once at startup and remembers it through the lifetime of the signers

To use the factory. Do as follows within your servlets init() method: Signer signer=ServletSignerFactory.getInstance().createSigner(config);

See Also:
org.neuclear.commons.crypto.passphraseagents.PassPhraseAgent, org.neuclear.commons.crypto.signers.Signer

Method Summary
 LedgerController createLedger(javax.servlet.ServletConfig config)
           
static ServletLedgerFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createLedger

public LedgerController createLedger(javax.servlet.ServletConfig config)
                              throws LowlevelLedgerException
Throws:
LowlevelLedgerException

getInstance

public static ServletLedgerFactory getInstance()


Copyright © 2003-2004 Antilles Software Ventures SA. All Rights Reserved.