|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.provisioner.requests.Request
public abstract class Request
Base class for requests to external services.
A Producer
reads requests from an external queue, and creates
Operation
s from their information.
The operation is passed to a Consumer
, which populates the
operation's set of ConfigRequests
(a single operation may require
multiple requests to multiple end-points.)
The consumer then uses a RequestFactory
to convert each
ConfigRequest into a Request, which is
executed, and examine for a successful response.
Constructor Summary | |
---|---|
Request()
|
Method Summary | |
---|---|
protected java.util.Collection<org.jdom.Element> |
filterElements(java.util.Iterator<org.jdom.Element> i,
java.lang.String matchingName)
Filters 's by comparing Element.getName() with matchingName
(simple equalsIgnoreCase comparison.) |
protected java.util.Map<java.lang.String,java.lang.Object> |
filterParameters(org.jdom.Document opParameters)
Convenience method for extending classes. |
abstract Response |
sendRequest()
|
protected void |
storeParameter(java.util.Map<java.lang.String,java.lang.Object> paramStore,
org.jdom.Element element)
Called by filterParameters when building a Map
of request parameters. |
protected void |
storeParameter(java.util.Map<java.lang.String,java.lang.Object> paramStore,
java.lang.String name,
java.lang.Object value)
The default method for processing request parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Request()
Method Detail |
---|
public abstract Response sendRequest() throws java.lang.Exception
java.lang.Exception
protected java.util.Map<java.lang.String,java.lang.Object> filterParameters(org.jdom.Document opParameters)
storeParameter
methods.
opParameters
- an XML document detailing parameters from an
operation. Typically, these will come from a request fetched from
the database.
protected void storeParameter(java.util.Map<java.lang.String,java.lang.Object> paramStore, org.jdom.Element element)
filterParameters
when building a Map
of request parameters. By default, this simply calls
storeParameter(Map,String,String)
with the element's
name
and value
attributes. Extending classes
may choose to store extra information (e.g. LDAPModifyRequest converts
parameters into ModificationItem
s.)
paramStore
- the Map that any parameters should be
stored in.element
- a parameter element from a Request's
operation parameters.protected void storeParameter(java.util.Map<java.lang.String,java.lang.Object> paramStore, java.lang.String name, java.lang.Object value)
paramStore
.
paramStore
- the Map that any parameters should be
stored in.name
- the name of the operation parameter.value
- the value of the named operation parameter.protected java.util.Collection<org.jdom.Element> filterElements(java.util.Iterator<org.jdom.Element> i, java.lang.String matchingName)
Element.getName()
with matchingName
(simple equalsIgnoreCase comparison.)
i
- an iterator for a collection of Elements.matchingName
- the value that elements are filtered by.
matchingName
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |