Module hiveutils
Back to master index

[public] Service Point hiveutils.AdapterBuilderFactory Interface: org.apache.hivemind.ServiceImplementationFactory
Used to construct a service from a class name and optional constructor parameters and properties.
Parameters occurs: one_plus
Parameters Schema
Element <exception-mapping>
Each exception-mapping element defines how an exception thrown by the built service shall be mapped to another one. The order in which exception-mapping elements appear is important (just like the order of catch clauses in Java).
Attribute from (required) Translator: class
Attribute to (required) Translator: class
Conversion Rules
<conversion class="net.sourceforge.hiveutils.service.impl.ExceptionMappingContribution" />
Element <exception-mapper>
Directly defines an object implementing ExceptionMapper to do specific mappings that are not one-to-one. This is allowed only once and it is exclusive with any use of the exception-mapping tag.
Attribute mapper (required) Translator: object
Conversion Rules
<conversion class="net.sourceforge.hiveutils.service.impl.ExceptionMapperContribution" />
Element <construct>
A single construct element identifies the class to instantiate.
Attribute autowire-services Translator: boolean,default=true
If true (the default), the BuilderFactory will attempt to connect unclaimed properties to services.
Attribute class (required) Translator: string
The name of the class to instantiate.
Attribute class-resolver-property Translator: string
The name of a property to assign the module's ClassResolver to.
Attribute error-handler-property Translator: string
The name of a property to assign the module's ErrorHandler to.
Attribute error-log-property Translator: string
The name of a property to assign the service's ErrorLog to.
Attribute initialize-method Translator: string
The name of a public instance method (taking no parameters) to be invoked after the service is constructed.
Attribute log-property Translator: string
The name of a property to assign the Log instance for the service to. The Log instance is built from the service configuration point id.
Attribute messages-property Translator: string
The name of a property to assign invoking module's messages to.
Attribute service-id-property Translator: string
The name of a property to assign the configuration point id of the service to.
Nested Elements
A single construct element identifies the class to instantiate.
<create-object class="org.apache.hivemind.service.impl.BuilderParameter" />
<read-attribute attribute="class" property="className" />
<read-attribute attribute="initialize-method" property="initializeMethod" />
<read-attribute attribute="autowire-services" property="autowireServices" skip-if-null="false" />
<invoke-parent method="addElement" />
<create-object class="org.apache.hivemind.service.impl.BuilderMessagesFacet" />
<read-attribute attribute="messages-property" property="propertyName" />
<invoke-parent method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderLogFacet" />
<read-attribute attribute="log-property" property="propertyName" />
<invoke-parent depth="2" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderServiceIdFacet" />
<read-attribute attribute="service-id-property" property="propertyName" />
<invoke-parent depth="3" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderErrorHandlerFacet" />
<read-attribute attribute="error-handler-property" property="propertyName" />
<invoke-parent depth="4" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderClassResolverFacet" />
<read-attribute attribute="class-resolver-property" property="propertyName" />
<invoke-parent depth="5" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderErrorLogFacet" />
<read-attribute attribute="error-log-property" property="propertyName" />
<invoke-parent depth="6" method="addProperty" />
Attribute class (required) Translator: string
The name of the class to instantiate.
Attribute messages-property Translator: string
The name of a property to assign invoking module's messages to.
Attribute log-property Translator: string
The name of a property to assign the Log instance for the service to. The Log instance is built from the service configuration point id.
Attribute service-id-property Translator: string
The name of a property to assign the configuration point id of the service to.
Attribute initialize-method Translator: string
The name of a public instance method (taking no parameters) to be invoked after the service is constructed.
Attribute error-handler-property Translator: string
The name of a property to assign the module's ErrorHandler to.
Attribute class-resolver-property Translator: string
The name of a property to assign the module's ClassResolver to.
Attribute autowire-services Translator: boolean,default=true
If true (the default), the BuilderFactory will attempt to connect unclaimed properties to services.
Attribute error-log-property Translator: string
The name of a property to assign the service's ErrorLog to.
Element <string>
A string value constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="null" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <int>
An integer value constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="int" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <long>
A long (64-bit) integer value constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="long" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <boolean>
A boolean value constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="enumeration,java.lang.Boolean,true=TRUE,false=FALSE" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <service>
A constructor parameter providing the identified HiveMind service.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="service" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <configuration>
A constructor parameter providing a HiveMind configuration point (as a List).
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="configuration" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <resource>
A Resource constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="resource" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <log>
Placeholder for a Log instance for the constructed service as constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderLogFacet" />
<invoke-parent depth="7" method="addParameter" />
Element <error-handler>
Placeholder for the module's ErrorHandler instance passed in as a constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderErrorHandlerFacet" />
<invoke-parent depth="7" method="addParameter" />
Element <error-log>
Placeholder for the service's ErrorLog instance passed in as a constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderErrorLogFacet" />
<invoke-parent depth="7" method="addParameter" />
Element <class-resolver>
Placeholder for the module's ClassResolver instance passed in as a constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderClassResolverFacet" />
<invoke-parent depth="7" method="addParameter" />
Element <messages>
Placeholder for a Messages object (from the invoking module) as constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderMessagesFacet" />
<invoke-parent depth="7" method="addParameter" />
Element <service-id>
Placeholder for the service id (of the constructed service) as constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderServiceIdFacet" />
<invoke-parent depth="7" method="addParameter" />
Element <object>
Placeholder for an object provided by the object translator as a constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="object" />
<read-content property="value" />
<invoke-parent depth="7" method="addParameter" />
Element <null>
Placeholder for a null object provided by the object translator as a constructor parameter.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="object" />
<invoke-parent depth="7" method="addParameter" />
Element <set>
Configures a property of the service instance.
Attribute property (required) Translator: string
The name of a property of the service instance to configure.
Attribute value (required) Translator: string
The value to set the property to. The value will be converted to the type of the property.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="smart" />
<read-attribute attribute="property" property="propertyName" />
<read-attribute attribute="value" property="value" />
<invoke-parent depth="7" method="addProperty" />
Element <set-object>
Configures a property of the service instance using an object.
Attribute property (required) Translator: string
The name of a property of the service instance to configure.
Attribute value (required) Translator: string
The value to set the property to, in the form of a prefix and a locator for that prefix. Prefixes are defined by the ObjectProviders configuration point. Each prefix provides a different interpretation for the locator, such as a service id or class name.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="object" />
<read-attribute attribute="property" property="propertyName" />
<read-attribute attribute="value" property="value" />
<invoke-parent depth="7" method="addProperty" />
Element <set-service>
Configures a property of the service instance to another service.
Attribute property (required) Translator: string
The name of the property of the service instance to configure.
Attribute service-id (required) Translator: string
The id of the service.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="service" />
<read-attribute attribute="property" property="propertyName" />
<read-attribute attribute="service-id" property="value" />
<invoke-parent depth="7" method="addProperty" />
Element <set-configuration>
Configures a property of the service instance to the elements contributed to an configuration point.
Attribute configuration-id (required) Translator: string
The id of the configuration point to access.
Attribute property (required) Translator: string
The name of the property of the service instance to configure.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="configuration" />
<read-attribute attribute="property" property="propertyName" />
<read-attribute attribute="configuration-id" property="value" />
<invoke-parent depth="7" method="addProperty" />
Element <set-resource>
Configures a property of the service instance to a resource.
Attribute path (required) Translator: string
The path, relative to the module's deployment descriptor, of the resource.
Attribute property (required) Translator: string
The name of the property of the service instance to configure.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderPropertyFacet" />
<set-property property="translator" value="resource" />
<read-attribute attribute="property" property="propertyName" />
<read-attribute attribute="path" property="value" />
<invoke-parent depth="7" method="addProperty" />
Element <event-listener>
Registers the new services as an event listener for events produced by the specified service.
Attribute event-set Translator: string
If given, the name of an event set for which the service will be registered. If omitted, the service will be registered for all events sets for which it implements the necessary listener interfaces.
Attribute service-id (required) Translator: service
The service which will produce events.
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.EventRegistration" />
<read-attribute attribute="service-id" property="producer" />
<read-attribute attribute="event-set" property="eventSetName" />
<invoke-parent depth="7" method="addEventRegistration" />
Conversion Rules
<create-object class="org.apache.hivemind.service.impl.BuilderParameter" />
<read-attribute attribute="class" property="className" />
<read-attribute attribute="initialize-method" property="initializeMethod" />
<read-attribute attribute="autowire-services" property="autowireServices" skip-if-null="false" />
<invoke-parent method="addElement" />
<create-object class="org.apache.hivemind.service.impl.BuilderMessagesFacet" />
<read-attribute attribute="messages-property" property="propertyName" />
<invoke-parent method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderLogFacet" />
<read-attribute attribute="log-property" property="propertyName" />
<invoke-parent depth="2" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderServiceIdFacet" />
<read-attribute attribute="service-id-property" property="propertyName" />
<invoke-parent depth="3" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderErrorHandlerFacet" />
<read-attribute attribute="error-handler-property" property="propertyName" />
<invoke-parent depth="4" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderClassResolverFacet" />
<read-attribute attribute="class-resolver-property" property="propertyName" />
<invoke-parent depth="5" method="addProperty" />
<create-object class="org.apache.hivemind.service.impl.BuilderErrorLogFacet" />
<read-attribute attribute="error-log-property" property="propertyName" />
<invoke-parent depth="6" method="addProperty" />
Implementation
  • <create-instance class="net.sourceforge.hiveutils.service.impl.AdapterBuilderFactory" model="primitive" />

Module hiveutils
Back to master index