|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.negotiation.Request
public class Request
The Request class represents a service negotiation request. A request is
usually based on a Template and is generally sent to the publisher
of the template.
setValue method.
| Constructor Summary | |
|---|---|
Request(Template template)
Generate a new Request, based on a template. |
|
| Method Summary | |
|---|---|
AgreementOffer |
getAgreementOffer()
Generate an AgreementOffer, this may still be used internally in AgentScape for the negotiation. |
Service |
getService(java.lang.String serviceName)
Get a Service from the request. |
AgentScapeID |
getTarget()
Get the target this request is to be sent to. |
void |
setInitiator(java.lang.Object initiator)
Set the initiator (ie. |
void |
setValue(java.lang.String serviceName,
java.lang.String fieldName,
java.lang.Object value)
Add a value to a field in a Service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Request(Template template)
setValue. All service
properties are optional for now.
template - The template which this request is based on.| Method Detail |
|---|
public void setValue(java.lang.String serviceName,
java.lang.String fieldName,
java.lang.Object value)
throws TemplateException,
ServiceException,
RestrictionException
serviceName - The service name to set a value in. Same as
Service.set(String,Object) with parameters fieldName and
value). If a Service with name serviceName was not yet set
in this Request, it will be added to the Request.fieldName - The property name of the service to set the value for.value - The value to set the service property to. If possible, and if there
are restrictions to the values of the service property, these will
be checked before actually setting the value of the property.
TemplateException - If the template does not support the service serviceName.
ServiceException - If the property field cannot be set. This can happen if the
field does not exist in the service, or if the Service is
readonly.
RestrictionException - If value is not in the allowed range for field.
public Service getService(java.lang.String serviceName)
throws TemplateException
serviceName is also in the Template that this
service is based on.
If no exceptions are thrown during the execution of this method, then
the returned service is part of the request. This means that when a
service was not part of the Request, it is added to the request.
serviceName - The name of the service to obtain from the Request.
serviceName, that is part of
this Request. The Service will be included in the Request.
TemplateException - If serviceName is not specified in the template.public AgreementOffer getAgreementOffer()
public AgentScapeID getTarget()
public void setInitiator(java.lang.Object initiator)
initiator - Any Object can be used to identify the initiator. The String
representation (as obtained by initiator.toString())
of this object is used in the marshalled document.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||