|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object context.arch.service.Service
This class implements a service object.
Services
Field Summary | |
static java.lang.String |
ASYNCHRONOUS
Tag to indicate service function is ASYNCHRONOUS |
protected CommunicationsHandler |
comm
|
static java.lang.String |
EXECUTED
Tag to indicate the status of a service request is executed |
static java.lang.String |
EXECUTING
Tag to indicate the status of a service request is executing |
static java.lang.String |
FAILED
Tag to indicate the status of a service request is failed |
protected PendingOut |
pending
|
static java.lang.String |
SERVICE_REQUEST
Tag for a service request |
static java.lang.String |
SERVICE_REQUEST_REPLY
Tag to indicate message is a service reply |
static java.lang.String |
SERVICE_RESULT
Tag for a service result |
static java.lang.String |
SERVICE_RESULT_REPLY
Tag for a service result reply |
static java.lang.String |
STATUS
Tag to indicate the status of a service request |
static java.lang.String |
SYNCHRONOUS
Tag to indicate service function is SYNCHRONOUS |
Constructor Summary | |
Service(CommunicationsHandler comm)
Basic constructor that creates a service object. |
|
Service(CommunicationsHandler comm,
java.lang.String name,
FunctionDescriptions functions)
Basic constructor that creates a service object. |
Method Summary | |
abstract DataObject |
execute(ServiceInput serviceInput)
This abstract method defines what should occur when the service is executed. |
FunctionDescriptions |
getFunctionDescriptions()
Returns the descriptions of the service functions |
java.lang.String |
getName()
Returns the service name |
ServiceDescription |
getServiceDescription()
Returns the ServiceDescription object |
protected DataObject |
sendServiceResult(ServiceInput input,
Attributes atts)
This method is called to send a the results of an asynchronous service execution to a requesting component. |
void |
setFunctionDescriptions(FunctionDescriptions functions)
Sets the descriptions of the service functions |
void |
setName(java.lang.String name)
Sets the service name |
DataObject |
toDataObject()
Creates a ServiceDescription object and returns the DataObject version of it |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SERVICE_REQUEST
public static final java.lang.String SERVICE_REQUEST_REPLY
public static final java.lang.String SERVICE_RESULT
public static final java.lang.String SERVICE_RESULT_REPLY
public static final java.lang.String SYNCHRONOUS
public static final java.lang.String ASYNCHRONOUS
public static final java.lang.String STATUS
public static final java.lang.String EXECUTING
public static final java.lang.String EXECUTED
public static final java.lang.String FAILED
protected CommunicationsHandler comm
protected PendingOut pending
Constructor Detail |
public Service(CommunicationsHandler comm)
comm
- Object that implements the CommunicationsHandler interfaceCommunicationsHandler
,
PendingOut
public Service(CommunicationsHandler comm, java.lang.String name, FunctionDescriptions functions)
comm
- Object that implements the CommunicationsHandler interfaceCommunicationsHandler
,
PendingOut
Method Detail |
public abstract DataObject execute(ServiceInput serviceInput)
serviceInput
- Object that contains all the information necessary to execute the service.
protected DataObject sendServiceResult(ServiceInput input, Attributes atts)
input
- Object containing information on the requesting componentatts
- AttributeNameValues containing the service results
CommunicationsHandler.userRequest(DataObject,String,String,int)
public void setName(java.lang.String name)
name
- Name of the servicepublic java.lang.String getName()
public void setFunctionDescriptions(FunctionDescriptions functions)
functions
- Descriptions of the service functionspublic FunctionDescriptions getFunctionDescriptions()
public ServiceDescription getServiceDescription()
public DataObject toDataObject()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |