|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServiceFactory
Interface that defines the service factory for generating instances of agent services that can be invoked from the agent's interpreter loop.
| Field Summary | |
|---|---|
static java.lang.String |
FACTORY_METHOD
The name of the factory method used to get the ServiceMaker instance from a service class |
| Method Summary | |
|---|---|
WebService |
createNewRESTService(KsSymbol serviceName,
KsSymbol serviceType,
Agent owner,
KsSymbol baseURL,
Resource config)
Answer a new instance of an agent servie that is provisioned as a REST-style web service, where the service is invoked as a base URL and a series of HTTP GET encoded arguments. |
AgentService |
createNewService(KsSymbol serviceType,
Agent owner,
Resource configRoot)
Answer a new instance of the service of the given type, named with a UUID. |
AgentService |
createNewService(KsSymbol serviceName,
KsSymbol serviceType,
Agent owner,
Resource configRoot)
Answer a new instance of the service of the given type. |
WebService |
createNewWebService(KsSymbol serviceType,
Agent owner,
KsSymbol wsdlURI,
Resource config)
Answer a new instance of an agent service that is provisioned as a web service, using the given WSDL document to define the web service end point. |
WebService |
createNewWebService(KsSymbol serviceName,
KsSymbol serviceType,
Agent owner,
KsSymbol wsdlURI,
Resource config)
Answer a new instance of an agent service that is provisioned as a web service, using the given WSDL document to define the web service end point. |
ServiceRegistry |
createServiceRegistry(Agent owner)
Answer a new service registry. |
ServiceRegistry |
getGlobalServiceRegistry()
Answer a reference to the shared service registry. |
ServiceMaker |
getServiceMaker(java.lang.String className)
Answer the factory ServiceMake instance for the service class denoted by the given class name. |
void |
registerServiceType(KsSymbol serviceType,
ServiceMaker maker)
Register the given service maker as the means of creating services of the given type. |
| Field Detail |
|---|
static final java.lang.String FACTORY_METHOD
| Method Detail |
|---|
AgentService createNewService(KsSymbol serviceType,
Agent owner,
Resource configRoot)
Answer a new instance of the service of the given type, named with a UUID.
serviceType - Symbol denoting the type of service to instantiateowner - The owner of the new service, or null to create a global serviceconfigRoot - Optional RDF resource that specifies additional configuration information for the service. Use
null if no configuration data is needed or available
AgentService createNewService(KsSymbol serviceName,
KsSymbol serviceType,
Agent owner,
Resource configRoot)
Answer a new instance of the service of the given type.
serviceName - Symbol denoting the name of the serviceserviceType - Symbol denoting the type of service to instantiateowner - The owner of the new service, or null to create a global serviceconfigRoot - Optional RDF resource that specifies additional configuration information for the service. Use
null if no configuration data is needed or available
WebService createNewWebService(KsSymbol serviceType,
Agent owner,
KsSymbol wsdlURI,
Resource config)
Answer a new instance of an agent service that is provisioned as a web service, using the given WSDL document to define the web service end point. This factory method assumes that the given WSDL file defines exactly one service.
serviceType - Optional service type for the service (defaults to nuin:webService)owner - The optional owner of the service; use null for a global servicewsdlURI - The URI of the WSDL document that defines the web-service endpointconfig - Optional configuration resource
NuinException - if the given WSDL file does not contain exactly one service
definition
WebService createNewWebService(KsSymbol serviceName,
KsSymbol serviceType,
Agent owner,
KsSymbol wsdlURI,
Resource config)
Answer a new instance of an agent service that is provisioned as a web service, using the given WSDL document to define the web service end point.
serviceName - Symbol denoting the name of the serviceserviceType - Optional service type for the service (defaults to nuin:webService)owner - The optional owner of the service; use null for a global servicewsdlURI - The URI of the WSDL document that defines the web-service endpoint
NuinException - if the given WSDL file does not contain a description of the
named service
WebService createNewRESTService(KsSymbol serviceName,
KsSymbol serviceType,
Agent owner,
KsSymbol baseURL,
Resource config)
Answer a new instance of an agent servie that is provisioned as a REST-style web service, where the service is invoked as a base URL and a series of HTTP GET encoded arguments.
serviceName - Optional symbol denoting the name of the serviceserviceType - Optional symbol denoting the service typeowner - The agent that owns this service instance; use null for a global servicebaseURL - Symbol denoting the base URL of the REST serviceconfig - Optional configuration resource
ServiceException - if the service is not correctly specified
void registerServiceType(KsSymbol serviceType,
ServiceMaker maker)
Register the given service maker as the means of creating services of the given type.
serviceType - A symbol denoting a service typemaker - A factory object that can create new services instances of type
serviceTypeServiceRegistry getGlobalServiceRegistry()
Answer a reference to the shared service registry.
ServiceRegistry createServiceRegistry(Agent owner)
Answer a new service registry.
owner - The agent that will own the service registry
ServiceMaker getServiceMaker(java.lang.String className)
Answer the factory ServiceMake instance for the service class denoted by the given class name.
className - The name of the service class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||