public abstract class Request
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
clientTxnID
the client transaction ID
|
Constructor and Description |
---|
Request() |
Modifier and Type | Method and Description |
---|---|
Response |
execute(Port port)
execute the this request on the given port.
|
protected abstract java.lang.String |
getActionCode()
return the action string for this request
|
java.lang.String |
getClientTxnID()
return the client transaction ID
|
protected java.lang.String |
getProtocolVersion()
return the version number of the protocol.
|
protected abstract void |
requestToKVList(KVList list)
method that needs to be implemented by subclasses for the
key-value list conversion
|
protected abstract void |
requestToXml(org.w3c.dom.Node node)
method that needs to be implemented by subclasses for the XML conversion
|
void |
setClientTxnID(java.lang.String txnID)
set the client transaction ID
|
void |
toList(KVList list)
convert the request to a key-value list
|
java.lang.String |
toString()
return a string representation for debugging purposes
|
void |
toXml(org.w3c.dom.Document doc)
convert the request into an XML document
|
public Response execute(Port port) throws java.io.IOException
Response
are
returned.port
- the port on which this request shall
be executedjava.io.IOException
- if the execution failedpublic final void toXml(org.w3c.dom.Document doc) throws org.w3c.dom.DOMException, EncodeException
doc
- the empty document which shall be filledorg.w3c.dom.DOMException
- on DOM exceptionsEncodeException
- if the encoding fails for some reasonprotected abstract void requestToXml(org.w3c.dom.Node node) throws org.w3c.dom.DOMException, EncodeException
node
- the node where the request shall be added toorg.w3c.dom.DOMException
- on DOM exceptionsEncodeException
- if the encoding fails for some reasonpublic final void toList(KVList list) throws EncodeException
list
- an empty list which whould be filledEncodeException
- if the encoding fails for some reasonprotected java.lang.String getProtocolVersion()
DenicConstants.RRI_VERSION
protected abstract java.lang.String getActionCode()
protected abstract void requestToKVList(KVList list) throws EncodeException
list
- the list that has to be filledEncodeException
- if the encoding fails for some reasonpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getClientTxnID()
null
if not setpublic void setClientTxnID(java.lang.String txnID)
txnID
- the new transaction ID, may be null
Copyright © 2005-2013 Knipp Medien und Kommunikation GmbH