net.sf.joost.stx
Class HttpPostHandler
java.lang.Object
net.sf.joost.emitter.StxEmitterBase
net.sf.joost.emitter.StreamEmitter
net.sf.joost.emitter.XmlEmitter
net.sf.joost.stx.HttpPostHandler
- All Implemented Interfaces:
- TransformerHandler, Constants, StxEmitter, ContentHandler, DTDHandler, LexicalHandler
public class HttpPostHandler
- extends XmlEmitter
- implements TransformerHandler
Implements an HTTP POST connection with a TransformerHandler
interface.
- Version:
- $Revision: 2.3 $ $Date: 2008/06/15 08:11:22 $
- Author:
- Oliver Becker
Fields inherited from interface net.sf.joost.Constants |
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS |
Methods inherited from class net.sf.joost.emitter.XmlEmitter |
characters, comment, endCDATA, endElement, processingInstruction, setOmitXmlDeclaration, setSupportDisableOutputEscaping, startCDATA, startDocument, startDTD, startElement, startPrefixMapping |
Methods inherited from class net.sf.joost.emitter.StreamEmitter |
encodeCharacters, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, newEmitter, newEmitter, newEmitter, newXMLEmitter, setDocumentLocator, skippedEntity, startEntity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
saxResult
private SAXResult saxResult
- event sink for this transformer
buffer
private StringBuffer buffer
- the character buffer
targetURL
private String targetURL
- the target URL for the POST request
HttpPostHandler
public HttpPostHandler(String targetURL)
notationDecl
public void notationDecl(String name,
String publicId,
String systemId)
- Specified by:
notationDecl
in interface DTDHandler
unparsedEntityDecl
public void unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
- Specified by:
unparsedEntityDecl
in interface DTDHandler
endDocument
public void endDocument()
throws SAXException
- Sends the collected XML fragment to the specified target URL and
passes the return stream to an
XMLReader
object, which is
connected to the Result
object of this
TransformerHandler
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class XmlEmitter
- Throws:
SAXException
setResult
public void setResult(Result result)
- Specified by:
setResult
in interface TransformerHandler
setSystemId
public void setSystemId(String id)
- Description copied from interface:
StxEmitter
- Set the system identifier for this emitter. This is optional - the
system identifier may be used to resolve relative output identifiers.
- Specified by:
setSystemId
in interface TransformerHandler
- Specified by:
setSystemId
in interface StxEmitter
- Overrides:
setSystemId
in class StxEmitterBase
- Parameters:
id
- the system identifier as a URI string
getSystemId
public String getSystemId()
- Description copied from interface:
StxEmitter
- Get the system identifier that was set with
StxEmitter.setSystemId(String)
.
- Specified by:
getSystemId
in interface TransformerHandler
- Specified by:
getSystemId
in interface StxEmitter
- Overrides:
getSystemId
in class StxEmitterBase
- Returns:
- the system identifier or
null
if
StxEmitter.setSystemId(String)
was not called.
getTransformer
public Transformer getTransformer()
- Specified by:
getTransformer
in interface TransformerHandler