You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by ah...@apache.org on 2006/11/08 18:10:46 UTC
svn commit: r472548 [1/2] - in /hivemind/branches/branch-2-0-annot:
annotations/src/java/org/apache/hivemind/annotations/internal/
framework/src/java/org/apache/hivemind/definition/
framework/src/java/org/apache/hivemind/definition/impl/ framework/src/...
Author: ahuegen
Date: Wed Nov 8 09:10:43 2006
New Revision: 472548
URL: http://svn.apache.org/viewvc?view=rev&rev=472548
Log:
Introduced definition interfaces
Added:
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java
- copied, changed from r470376, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ContributionDefinitionImpl.java
- copied, changed from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionDefinitionImpl.java
- copied, changed from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionPointDefinitionImpl.java
- copied, changed from r470376, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ModuleDefinitionImpl.java
- copied, changed from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/OrderedServiceInterceptorDefinitionImpl.java
- copied, changed from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/OrderedServiceInterceptorDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceImplementationDefinitionImpl.java
- copied, changed from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceInterceptorDefinitionImpl.java
- copied, changed from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServicePointDefinitionImpl.java
- copied, changed from r470376, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java
Removed:
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/OrderedServiceInterceptorDefinition.java
Modified:
hivemind/branches/branch-2-0-annot/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/DefinitionMessages.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinitionHelper.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/CoreServicesProvider.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureConstructor.java
hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServicePointImpl.java
hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/FrameworkTestCase.java
hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/TestServicesByInterface.java
hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/SimpleModule.java
hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/StringHolderModule.java
hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestServices.java
hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestShutdown.java
hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/TestToString.java
hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestInterceptors.java
hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructure.java
hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructureConstructor.java
hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestServicePoint.java
hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestVisibility.java
hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/service/impl/TestLoggingInterceptorFactory.java
hivemind/branches/branch-2-0-annot/library/src/test/hivemind/test/lib/TestDefaultImplementationBuilder.java
hivemind/branches/branch-2-0-annot/library/src/test/hivemind/test/lib/TestEJBProxyFactory.java
hivemind/branches/branch-2-0-annot/xml/pom.xml
hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/XmlModuleDescriptorProcessor.java
Modified: hivemind/branches/branch-2-0-annot/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java (original)
+++ hivemind/branches/branch-2-0-annot/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java Wed Nov 8 09:10:43 2006
@@ -14,16 +14,19 @@
import org.apache.hivemind.annotations.Contribution;
import org.apache.hivemind.annotations.Module;
import org.apache.hivemind.annotations.Service;
-import org.apache.hivemind.definition.ConfigurationPointDefinition;
-import org.apache.hivemind.definition.ContributionDefinition;
import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.RegistryDefinition;
import org.apache.hivemind.definition.ServiceImplementationDefinition;
-import org.apache.hivemind.definition.ServicePointDefinition;
import org.apache.hivemind.definition.Visibility;
import org.apache.hivemind.definition.construction.ConfigurationConstructor;
import org.apache.hivemind.definition.construction.ContributionConstructor;
import org.apache.hivemind.definition.construction.ImplementationConstructor;
+import org.apache.hivemind.definition.impl.ConfigurationPointDefinitionImpl;
+import org.apache.hivemind.definition.impl.ContributionDefinitionImpl;
+import org.apache.hivemind.definition.impl.ModuleDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServiceImplementationDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServicePointDefinitionImpl;
+import org.apache.hivemind.impl.LocationImpl;
import org.apache.hivemind.util.ClasspathResource;
import org.apache.hivemind.util.IdUtils;
@@ -59,7 +62,7 @@
*/
public void processModule(Class moduleClass)
{
- ModuleDefinition module = new ModuleDefinition(determineModuleId(moduleClass),
+ ModuleDefinition module = new ModuleDefinitionImpl(determineModuleId(moduleClass),
createModuleLocation(moduleClass), _classResolver, moduleClass.getPackage().getName());
// processServices(moduleClass);
@@ -138,14 +141,14 @@
Location location = new AnnotatedModuleLocation(module.getLocation().getResource(),
method.getDeclaringClass(), method);
- ServicePointDefinition spd = new ServicePointDefinition(module, service.id(), location,
+ ServicePointDefinitionImpl spd = new ServicePointDefinitionImpl(module, service.id(), location,
Visibility.PUBLIC, method.getReturnType().getName());
module.addServicePoint(spd);
ImplementationConstructor constructor = new FactoryMethodImplementationConstructor(module
.getLocation(), method, instanceProvider);
- ServiceImplementationDefinition sid = new ServiceImplementationDefinition(module, module
+ ServiceImplementationDefinition sid = new ServiceImplementationDefinitionImpl(module, module
.getLocation(), constructor, service.serviceModel(), true);
spd.addImplementation(sid);
@@ -165,7 +168,7 @@
ConfigurationConstructor constructor = new FactoryMethodConfigurationConstructor(location
, method, instanceProvider);
- ConfigurationPointDefinition cpd = new ConfigurationPointDefinition(module, configuration.id(), module
+ ConfigurationPointDefinitionImpl cpd = new ConfigurationPointDefinitionImpl(module, configuration.id(), module
.getLocation(), Visibility.PUBLIC, constructor, method.getReturnType().getName(), Occurances.UNBOUNDED);
module.addConfigurationPoint(cpd);
@@ -184,7 +187,7 @@
ContributionConstructor constructor = new TemplateMethodContributionConstructor(
location, method, instanceProvider);
- ContributionDefinition cd = new ContributionDefinition(module, module
+ ContributionDefinitionImpl cd = new ContributionDefinitionImpl(module, module
.getLocation(), constructor);
String qualifiedConfigurationId = IdUtils.qualify(
module.getId(),
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,27 @@
+package org.apache.hivemind.definition;
+
+import java.util.List;
+
+import org.apache.hivemind.Occurances;
+import org.apache.hivemind.definition.construction.ConfigurationConstructor;
+
+public interface ConfigurationPointDefinition extends ExtensionPointDefinition
+{
+
+ public ConfigurationConstructor getConstructor();
+
+ public void setConstructor(ConfigurationConstructor constructor);
+
+ public String getContainerClassName();
+
+ public void setContainerClassName(String containerClassName);
+
+ public Occurances getExpectedContributions();
+
+ public void setExpectedContributions(Occurances expectedContributions);
+
+ public List getContributions();
+
+ public void addContribution(ContributionDefinition contribution);
+
+}
\ No newline at end of file
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,12 @@
+package org.apache.hivemind.definition;
+
+import org.apache.hivemind.definition.construction.ContributionConstructor;
+
+public interface ContributionDefinition extends ExtensionDefinition
+{
+
+ public ContributionConstructor getContributionConstructor();
+
+ public void setContributionConstructor(ContributionConstructor contributionConstructor);
+
+}
\ No newline at end of file
Modified: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/DefinitionMessages.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/DefinitionMessages.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/DefinitionMessages.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/DefinitionMessages.java Wed Nov 8 09:10:43 2006
@@ -28,7 +28,7 @@
private static final MessageFormatter _formatter = new MessageFormatter(DefinitionMessages.class,
"DefinitionStrings");
- static String duplicateModuleId(String moduleId)
+ public static String duplicateModuleId(String moduleId)
{
return _formatter.format(
"duplicate-module-id",
@@ -46,22 +46,22 @@
occurances(expectation));
}
- static String duplicateServicePointId(String pointId, String moduleId)
+ public static String duplicateServicePointId(String pointId, String moduleId)
{
return _formatter.format("duplicate-service-point", pointId, moduleId);
}
- static String duplicateConfigurationPointId(String pointId, String moduleId)
+ public static String duplicateConfigurationPointId(String pointId, String moduleId)
{
return _formatter.format("duplicate-configuration-point", pointId, moduleId);
}
- static String contributionCount(int count)
+ public static String contributionCount(int count)
{
return _formatter.format("contribution-count", new Integer(count));
}
- static String occurances(Occurances occurances)
+ public static String occurances(Occurances occurances)
{
return _formatter.getMessage("occurances." + occurances.getName());
}
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,26 @@
+package org.apache.hivemind.definition;
+
+import org.apache.hivemind.Location;
+
+public interface ExtensionDefinition
+{
+
+ /**
+ * @return the id of the module that contributed this extension
+ */
+ public String getModuleId();
+
+ /**
+ * @return the module that contributed this extension
+ */
+ public ModuleDefinition getModule();
+
+ public Location getLocation();
+
+ public void setLocation(Location location);
+
+ public Object getNature(Class natureClass);
+
+ public void addNature(Class natureClass, Object nature);
+
+}
\ No newline at end of file
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,34 @@
+package org.apache.hivemind.definition;
+
+import java.util.Map;
+
+import org.apache.hivemind.Location;
+
+public interface ExtensionPointDefinition
+{
+ /**
+ * @return the id of the module that defined this extension point
+ */
+ public String getModuleId();
+
+ public String getFullyQualifiedId();
+
+ public String getId();
+
+ public void setId(String id);
+
+ public Location getLocation();
+
+ public void setLocation(Location location);
+
+ public Visibility getVisibility();
+
+ public void setVisibility(Visibility visibility);
+
+ public Object getNature(Class natureClass);
+
+ public Map getNatures();
+
+ public void addNature(Class natureClass, Object nature);
+
+}
\ No newline at end of file
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,76 @@
+package org.apache.hivemind.definition;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.hivemind.ClassResolver;
+import org.apache.hivemind.Location;
+
+public interface ModuleDefinition
+{
+
+ public ClassResolver getClassResolver();
+
+ public void setClassResolver(ClassResolver classResolver);
+
+ public Location getLocation();
+
+ public void setLocation(Location location);
+
+ public String getId();
+
+ public void setId(String moduleId);
+
+ /**
+ * Returns the name of the package to search for class names within. By default, the package
+ * name will match the module id, but this can be overridden in the module descriptor.
+ */
+ public String getPackageName();
+
+ public void setPackageName(String packageName);
+
+ /**
+ * Adds a service point definition to the module.
+ * @param servicePoint the service point
+ * @throws ApplicationRuntimeException if another service point with the same id has already been defined
+ */
+ public void addServicePoint(ServicePointDefinition servicePoint)
+ throws ApplicationRuntimeException;
+
+ public ServicePointDefinition getServicePoint(String id);
+
+ public Collection getServicePoints();
+
+ /**
+ * Adds a configuration point definition to the module.
+ * @param configurationPoint the configuration point
+ * @throws ApplicationRuntimeException if another configuration point with the same id has already been defined
+ */
+ public void addConfigurationPoint(ConfigurationPointDefinition configurationPoint)
+ throws ApplicationRuntimeException;
+
+ public ConfigurationPointDefinition getConfigurationPoint(String id);
+
+ public Collection getConfigurationPoints();
+
+ public Collection getDependencies();
+
+ public void addDependency(String dependsOnModuleId);
+
+ public void addServiceImplementation(String qualifiedServicePointId,
+ ServiceImplementationDefinition implementation);
+
+ public void addServiceInterceptor(String qualifiedServicePointId,
+ ServiceInterceptorDefinition interceptor);
+
+ public void addContribution(String qualifiedConfigurationPointId,
+ ContributionDefinition contribution);
+
+ public List getContributions();
+
+ public List getImplementations();
+
+ public List getInterceptors();
+
+}
\ No newline at end of file
Modified: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinitionHelper.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinitionHelper.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinitionHelper.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinitionHelper.java Wed Nov 8 09:10:43 2006
@@ -4,6 +4,10 @@
import org.apache.hivemind.definition.construction.ConfigurationConstructor;
import org.apache.hivemind.definition.construction.ContributionConstructor;
import org.apache.hivemind.definition.construction.ImplementationConstructor;
+import org.apache.hivemind.definition.impl.ConfigurationPointDefinitionImpl;
+import org.apache.hivemind.definition.impl.ContributionDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServiceImplementationDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServicePointDefinitionImpl;
import org.apache.hivemind.impl.CreateClassServiceConstructor;
import org.apache.hivemind.internal.ServiceModel;
@@ -18,7 +22,7 @@
public ServicePointDefinition addServicePoint(String servicePointId, String serviceInterface)
{
- ServicePointDefinition result = new ServicePointDefinition(_module, servicePointId, _module
+ ServicePointDefinitionImpl result = new ServicePointDefinitionImpl(_module, servicePointId, _module
.getLocation(), Visibility.PUBLIC, serviceInterface);
_module.addServicePoint(result);
@@ -38,7 +42,7 @@
ImplementationConstructor constructor, String serviceModel
)
{
- ServiceImplementationDefinition result = new ServiceImplementationDefinition(_module, _module
+ ServiceImplementationDefinition result = new ServiceImplementationDefinitionImpl(_module, _module
.getLocation(), constructor, serviceModel, true);
servicePoint.addImplementation(result);
return result;
@@ -56,7 +60,7 @@
public ConfigurationPointDefinition addConfigurationPoint(String configurationPointId,
ConfigurationConstructor constructor, String containerType)
{
- ConfigurationPointDefinition result = new ConfigurationPointDefinition(_module, configurationPointId, _module
+ ConfigurationPointDefinitionImpl result = new ConfigurationPointDefinitionImpl(_module, configurationPointId, _module
.getLocation(), Visibility.PUBLIC, constructor, containerType, Occurances.UNBOUNDED);
_module.addConfigurationPoint(result);
@@ -66,7 +70,7 @@
public ContributionDefinition addContributionDefinition(ConfigurationPointDefinition configurationPoint,
ContributionConstructor contributionConstructor)
{
- ContributionDefinition result = new ContributionDefinition(_module, _module.getLocation(), contributionConstructor);
+ ContributionDefinition result = new ContributionDefinitionImpl(_module, _module.getLocation(), contributionConstructor);
configurationPoint.addContribution(result);
return result;
}
@@ -74,7 +78,7 @@
public ContributionDefinition addContributionDefinition(String fullyQualifiedConfigurationPointId,
ContributionConstructor contributionConstructor)
{
- ContributionDefinition result = new ContributionDefinition(_module, _module.getLocation(), contributionConstructor);
+ ContributionDefinitionImpl result = new ContributionDefinitionImpl(_module, _module.getLocation(), contributionConstructor);
_module.addContribution(fullyQualifiedConfigurationPointId, result);
return result;
}
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,20 @@
+package org.apache.hivemind.definition;
+
+import org.apache.hivemind.definition.construction.ImplementationConstructor;
+
+public interface ServiceImplementationDefinition extends ExtensionDefinition
+{
+
+ public String getServiceModel();
+
+ public void setServiceModel(String interfaceClassName);
+
+ public boolean isDefault();
+
+ public void setDefault(boolean isDefault);
+
+ public ImplementationConstructor getServiceConstructor();
+
+ public void setServiceConstructor(ImplementationConstructor serviceConstructor);
+
+}
\ No newline at end of file
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,16 @@
+package org.apache.hivemind.definition;
+
+import org.apache.hivemind.definition.construction.InterceptorConstructor;
+
+public interface ServiceInterceptorDefinition extends ExtensionDefinition
+{
+
+ public InterceptorConstructor getInterceptorConstructor();
+
+ public void setInterceptorConstructor(InterceptorConstructor serviceConstructor);
+
+ public String getName();
+
+ public void setName(String name);
+
+}
\ No newline at end of file
Added: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java?view=auto&rev=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java (added)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java Wed Nov 8 09:10:43 2006
@@ -0,0 +1,24 @@
+package org.apache.hivemind.definition;
+
+import java.util.List;
+
+import org.apache.hivemind.definition.impl.ServiceImplementationDefinitionImpl;
+
+public interface ServicePointDefinition extends ExtensionPointDefinition
+{
+
+ public String getInterfaceClassName();
+
+ public void setInterfaceClassName(String interfaceClassName);
+
+ public List getImplementations();
+
+ public ServiceImplementationDefinition getDefaultImplementation();
+
+ public void addImplementation(ServiceImplementationDefinition implementation);
+
+ public List getInterceptors();
+
+ public void addInterceptor(ServiceInterceptorDefinition interceptor);
+
+}
\ No newline at end of file
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java (from r470376, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java&r1=470376&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,13 +1,17 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import java.util.ArrayList;
import java.util.List;
import org.apache.hivemind.Location;
import org.apache.hivemind.Occurances;
+import org.apache.hivemind.definition.ConfigurationPointDefinition;
+import org.apache.hivemind.definition.ContributionDefinition;
+import org.apache.hivemind.definition.ModuleDefinition;
+import org.apache.hivemind.definition.Visibility;
import org.apache.hivemind.definition.construction.ConfigurationConstructor;
-public class ConfigurationPointDefinition extends ExtensionPointDefinition
+public class ConfigurationPointDefinitionImpl extends ExtensionPointDefinitionImpl implements ConfigurationPointDefinition
{
private ConfigurationConstructor _constructor;
@@ -17,12 +21,12 @@
private List _contributions = new ArrayList();
- public ConfigurationPointDefinition(ModuleDefinition module)
+ public ConfigurationPointDefinitionImpl(ModuleDefinition module)
{
super(module);
}
- public ConfigurationPointDefinition(ModuleDefinition module, String id, Location location, Visibility visibility,
+ public ConfigurationPointDefinitionImpl(ModuleDefinition module, String id, Location location, Visibility visibility,
ConfigurationConstructor constructor, String containerClassName,
Occurances expectedContributions)
{
@@ -32,41 +36,65 @@
_expectedContributions = expectedContributions;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#getConstructor()
+ */
public ConfigurationConstructor getConstructor()
{
return _constructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#setConstructor(org.apache.hivemind.definition.construction.ConfigurationConstructor)
+ */
public void setConstructor(ConfigurationConstructor constructor)
{
_constructor = constructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#getContainerClassName()
+ */
public String getContainerClassName()
{
return _containerClassName;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#setContainerClassName(java.lang.String)
+ */
public void setContainerClassName(String containerClassName)
{
_containerClassName = containerClassName;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#getExpectedContributions()
+ */
public Occurances getExpectedContributions()
{
return _expectedContributions;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#setExpectedContributions(org.apache.hivemind.Occurances)
+ */
public void setExpectedContributions(Occurances expectedContributions)
{
_expectedContributions = expectedContributions;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#getContributions()
+ */
public List getContributions()
{
return _contributions;
}
+ /**
+ * @see org.apache.hivemind.definition.ConfigurationPointDefinition#addContribution(org.apache.hivemind.definition.ContributionDefinition)
+ */
public void addContribution(ContributionDefinition contribution)
{
_contributions.add(contribution);
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ContributionDefinitionImpl.java (from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ContributionDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java&r1=470270&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ContributionDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ContributionDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ContributionDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,29 +1,37 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import org.apache.hivemind.Location;
+import org.apache.hivemind.definition.ContributionDefinition;
+import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.construction.ContributionConstructor;
-public class ContributionDefinition extends ExtensionDefinition
+public class ContributionDefinitionImpl extends ExtensionDefinitionImpl implements ContributionDefinition
{
private ContributionConstructor _contributionConstructor;
- public ContributionDefinition(ModuleDefinition module)
+ public ContributionDefinitionImpl(ModuleDefinition module)
{
super(module);
}
- public ContributionDefinition(ModuleDefinition module, Location location,
+ public ContributionDefinitionImpl(ModuleDefinition module, Location location,
ContributionConstructor contributionConstructor)
{
super(module, location);
_contributionConstructor = contributionConstructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ContributionDefinition#getContributionConstructor()
+ */
public ContributionConstructor getContributionConstructor()
{
return _contributionConstructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ContributionDefinition#setContributionConstructor(org.apache.hivemind.definition.construction.ContributionConstructor)
+ */
public void setContributionConstructor(ContributionConstructor contributionConstructor)
{
_contributionConstructor = contributionConstructor;
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionDefinitionImpl.java (from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java&r1=470270&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,31 +1,33 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import java.util.HashMap;
import java.util.Map;
import org.apache.hivemind.Location;
+import org.apache.hivemind.definition.ExtensionDefinition;
+import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.util.Defense;
-public class ExtensionDefinition
+public class ExtensionDefinitionImpl implements ExtensionDefinition
{
private Location _location;
private ModuleDefinition _module;
private Map _natures = new HashMap();
- public ExtensionDefinition(ModuleDefinition module)
+ public ExtensionDefinitionImpl(ModuleDefinition module)
{
Defense.notNull(module, "module");
_module = module;
}
- public ExtensionDefinition(ModuleDefinition module, Location location)
+ public ExtensionDefinitionImpl(ModuleDefinition module, Location location)
{
this(module);
_location = location;
}
/**
- * @return the id of the module that contributed this extension
+ * @see org.apache.hivemind.definition.ExtensionDefinition#getModuleId()
*/
public String getModuleId()
{
@@ -33,28 +35,40 @@
}
/**
- * @return the module that contributed this extension
+ * @see org.apache.hivemind.definition.ExtensionDefinition#getModule()
*/
public ModuleDefinition getModule()
{
return _module;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionDefinition#getLocation()
+ */
public Location getLocation()
{
return _location;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionDefinition#setLocation(org.apache.hivemind.Location)
+ */
public void setLocation(Location location)
{
_location = location;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionDefinition#getNature(java.lang.Class)
+ */
public Object getNature(Class natureClass)
{
return _natures.get(natureClass);
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionDefinition#addNature(java.lang.Class, java.lang.Object)
+ */
public void addNature(Class natureClass, Object nature)
{
_natures.put(natureClass, nature);
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionPointDefinitionImpl.java (from r470376, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionPointDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java&r1=470376&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionPointDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ExtensionPointDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ExtensionPointDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,12 +1,15 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import java.util.HashMap;
import java.util.Map;
import org.apache.hivemind.Location;
+import org.apache.hivemind.definition.ExtensionPointDefinition;
+import org.apache.hivemind.definition.ModuleDefinition;
+import org.apache.hivemind.definition.Visibility;
import org.apache.hivemind.util.Defense;
-public class ExtensionPointDefinition
+public class ExtensionPointDefinitionImpl implements ExtensionPointDefinition
{
private ModuleDefinition _module;
@@ -18,13 +21,13 @@
private Map _natures = new HashMap();
- public ExtensionPointDefinition(ModuleDefinition module)
+ public ExtensionPointDefinitionImpl(ModuleDefinition module)
{
Defense.notNull(module, "module");
_module = module;
}
- public ExtensionPointDefinition(ModuleDefinition module, String id, Location location, Visibility visibility)
+ public ExtensionPointDefinitionImpl(ModuleDefinition module, String id, Location location, Visibility visibility)
{
this(module);
_id = id;
@@ -33,7 +36,7 @@
}
/**
- * @return the id of the module that defined this extension point
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#getModuleId()
*/
public String getModuleId()
{
@@ -45,51 +48,81 @@
return _module;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#getFullyQualifiedId()
+ */
public String getFullyQualifiedId()
{
return getModuleId() + "." + _id;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#getId()
+ */
public String getId()
{
return _id;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#setId(java.lang.String)
+ */
public void setId(String id)
{
_id = id;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#getLocation()
+ */
public Location getLocation()
{
return _location;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#setLocation(org.apache.hivemind.Location)
+ */
public void setLocation(Location location)
{
_location = location;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#getVisibility()
+ */
public Visibility getVisibility()
{
return _visibility;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#setVisibility(org.apache.hivemind.definition.Visibility)
+ */
public void setVisibility(Visibility visibility)
{
_visibility = visibility;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#getNature(java.lang.Class)
+ */
public Object getNature(Class natureClass)
{
return _natures.get(natureClass);
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#getNatures()
+ */
public Map getNatures()
{
return _natures;
}
+ /**
+ * @see org.apache.hivemind.definition.ExtensionPointDefinitionIF#addNature(java.lang.Class, java.lang.Object)
+ */
public void addNature(Class natureClass, Object nature)
{
_natures.put(natureClass, nature);
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ModuleDefinitionImpl.java (from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ModuleDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java&r1=470270&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ModuleDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ModuleDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ModuleDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,4 +1,4 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import java.util.ArrayList;
import java.util.Collection;
@@ -9,8 +9,16 @@
import org.apache.hivemind.ApplicationRuntimeException;
import org.apache.hivemind.ClassResolver;
import org.apache.hivemind.Location;
+import org.apache.hivemind.definition.ConfigurationPointDefinition;
+import org.apache.hivemind.definition.ContributionDefinition;
+import org.apache.hivemind.definition.DefinitionMessages;
+import org.apache.hivemind.definition.ModuleDefinition;
+import org.apache.hivemind.definition.ServiceImplementationDefinition;
+import org.apache.hivemind.definition.ServiceInterceptorDefinition;
+import org.apache.hivemind.definition.ServicePointDefinition;
+import org.apache.hivemind.definition.UnresolvedExtension;
-public class ModuleDefinition
+public class ModuleDefinitionImpl implements ModuleDefinition
{
private String _id;
@@ -32,7 +40,7 @@
private List _unresolvedInterceptors = new ArrayList();
- public ModuleDefinition()
+ public ModuleDefinitionImpl()
{
}
@@ -42,7 +50,7 @@
* @param resolver
* @param packageName name of the package to search for class names within. If null, it defaults to the id
*/
- public ModuleDefinition(String id, Location location, ClassResolver resolver, String packageName)
+ public ModuleDefinitionImpl(String id, Location location, ClassResolver resolver, String packageName)
{
_id = id;
_location = location;
@@ -52,54 +60,72 @@
else _packageName = id;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getClassResolver()
+ */
public ClassResolver getClassResolver()
{
return _classResolver;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#setClassResolver(org.apache.hivemind.ClassResolver)
+ */
public void setClassResolver(ClassResolver classResolver)
{
_classResolver = classResolver;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getLocation()
+ */
public Location getLocation()
{
return _location;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#setLocation(org.apache.hivemind.Location)
+ */
public void setLocation(Location location)
{
_location = location;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getId()
+ */
public String getId()
{
return _id;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#setId(java.lang.String)
+ */
public void setId(String moduleId)
{
this._id = moduleId;
}
/**
- * Returns the name of the package to search for class names within. By default, the package
- * name will match the module id, but this can be overridden in the module descriptor.
+ * @see org.apache.hivemind.definition.ModuleDefinition#getPackageName()
*/
public String getPackageName()
{
return _packageName;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#setPackageName(java.lang.String)
+ */
public void setPackageName(String packageName)
{
_packageName = packageName;
}
/**
- * Adds a service point definition to the module.
- * @param servicePoint the service point
- * @throws ApplicationRuntimeException if another service point with the same id has already been defined
+ * @see org.apache.hivemind.definition.ModuleDefinition#addServicePoint(org.apache.hivemind.definition.impl.ServicePointDefinition)
*/
public void addServicePoint(ServicePointDefinition servicePoint) throws ApplicationRuntimeException
{
@@ -110,20 +136,24 @@
_servicePoints.put(servicePoint.getId(), servicePoint);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getServicePoint(java.lang.String)
+ */
public ServicePointDefinition getServicePoint(String id)
{
return (ServicePointDefinition) _servicePoints.get(id);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getServicePoints()
+ */
public Collection getServicePoints()
{
return _servicePoints.values();
}
/**
- * Adds a configuration point definition to the module.
- * @param configurationPoint the configuration point
- * @throws ApplicationRuntimeException if another configuration point with the same id has already been defined
+ * @see org.apache.hivemind.definition.ModuleDefinition#addConfigurationPoint(org.apache.hivemind.definition.impl.ConfigurationPointDefinition)
*/
public void addConfigurationPoint(ConfigurationPointDefinition configurationPoint) throws ApplicationRuntimeException
{
@@ -134,26 +164,41 @@
_configurationPoints.put(configurationPoint.getId(), configurationPoint);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getConfigurationPoint(java.lang.String)
+ */
public ConfigurationPointDefinition getConfigurationPoint(String id)
{
return (ConfigurationPointDefinition) _configurationPoints.get(id);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getConfigurationPoints()
+ */
public Collection getConfigurationPoints()
{
return _configurationPoints.values();
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getDependencies()
+ */
public Collection getDependencies()
{
return _dependencies;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#addDependency(java.lang.String)
+ */
public void addDependency(String dependsOnModuleId)
{
_dependencies.add(dependsOnModuleId);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#addServiceImplementation(java.lang.String, org.apache.hivemind.definition.ServiceImplementationDefinition)
+ */
public void addServiceImplementation(String qualifiedServicePointId,
ServiceImplementationDefinition implementation)
{
@@ -162,6 +207,9 @@
_unresolvedImplementations.add(unresolvedExtension);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#addServiceInterceptor(java.lang.String, org.apache.hivemind.definition.ServiceInterceptorDefinition)
+ */
public void addServiceInterceptor(String qualifiedServicePointId,
ServiceInterceptorDefinition interceptor)
{
@@ -170,6 +218,9 @@
_unresolvedInterceptors.add(unresolvedExtension);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#addContribution(java.lang.String, org.apache.hivemind.definition.ContributionDefinition)
+ */
public void addContribution(String qualifiedConfigurationPointId,
ContributionDefinition contribution)
{
@@ -178,16 +229,25 @@
_unresolvedContributions.add(unresolvedExtension);
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getContributions()
+ */
public List getContributions()
{
return _unresolvedContributions;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getImplementations()
+ */
public List getImplementations()
{
return _unresolvedImplementations;
}
+ /**
+ * @see org.apache.hivemind.definition.ModuleDefinition#getInterceptors()
+ */
public List getInterceptors()
{
return _unresolvedInterceptors;
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/OrderedServiceInterceptorDefinitionImpl.java (from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/OrderedServiceInterceptorDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/OrderedServiceInterceptorDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/OrderedServiceInterceptorDefinition.java&r1=470270&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/OrderedServiceInterceptorDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/OrderedServiceInterceptorDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/OrderedServiceInterceptorDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,23 +1,24 @@
/**
*
*/
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import org.apache.hivemind.Location;
import org.apache.hivemind.Orderable;
+import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.construction.InterceptorConstructor;
/**
- * Specialization of {@link ServiceInterceptorDefinition} that implements the {@link Orderable}
+ * Specialization of {@link ServiceInterceptorDefinitionImpl} that implements the {@link Orderable}
* interface.
*/
-public class OrderedServiceInterceptorDefinition extends ServiceInterceptorDefinition implements Orderable
+public class OrderedServiceInterceptorDefinitionImpl extends ServiceInterceptorDefinitionImpl implements Orderable
{
private String _precedingInterceptorIds;
private String _followingInterceptorIds;
- public OrderedServiceInterceptorDefinition(ModuleDefinition module, String name, Location location, InterceptorConstructor interceptorConstructor,
+ public OrderedServiceInterceptorDefinitionImpl(ModuleDefinition module, String name, Location location, InterceptorConstructor interceptorConstructor,
String precedingInterceptorIds, String followingInterceptorIds)
{
super(module, name, location, interceptorConstructor);
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceImplementationDefinitionImpl.java (from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceImplementationDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java&r1=470270&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceImplementationDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceImplementationDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceImplementationDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,20 +1,22 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import org.apache.hivemind.Location;
+import org.apache.hivemind.definition.ModuleDefinition;
+import org.apache.hivemind.definition.ServiceImplementationDefinition;
import org.apache.hivemind.definition.construction.ImplementationConstructor;
-public class ServiceImplementationDefinition extends ExtensionDefinition
+public class ServiceImplementationDefinitionImpl extends ExtensionDefinitionImpl implements ServiceImplementationDefinition
{
private String _serviceModel;
private ImplementationConstructor _serviceConstructor;
private boolean _isDefault;
- public ServiceImplementationDefinition(ModuleDefinition module)
+ public ServiceImplementationDefinitionImpl(ModuleDefinition module)
{
super(module);
}
- public ServiceImplementationDefinition(ModuleDefinition module, Location location, ImplementationConstructor serviceConstructor, String serviceModel, boolean isDefault)
+ public ServiceImplementationDefinitionImpl(ModuleDefinition module, Location location, ImplementationConstructor serviceConstructor, String serviceModel, boolean isDefault)
{
super(module, location);
_serviceConstructor = serviceConstructor;
@@ -22,31 +24,49 @@
_isDefault = isDefault;
}
- public String getServiceModel()
+ /**
+ * @see org.apache.hivemind.definition.ServiceImplementationDefinition#getServiceModel()
+ */
+public String getServiceModel()
{
return _serviceModel;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceImplementationDefinition#setServiceModel(java.lang.String)
+ */
public void setServiceModel(String interfaceClassName)
{
_serviceModel = interfaceClassName;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceImplementationDefinition#isDefault()
+ */
public boolean isDefault()
{
return _isDefault;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceImplementationDefinition#setDefault(boolean)
+ */
public void setDefault(boolean isDefault)
{
_isDefault = isDefault;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceImplementationDefinition#getServiceConstructor()
+ */
public ImplementationConstructor getServiceConstructor()
{
return _serviceConstructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceImplementationDefinition#setServiceConstructor(org.apache.hivemind.definition.construction.ImplementationConstructor)
+ */
public void setServiceConstructor(ImplementationConstructor serviceConstructor)
{
_serviceConstructor = serviceConstructor;
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceInterceptorDefinitionImpl.java (from r470270, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceInterceptorDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java&r1=470270&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceInterceptorDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServiceInterceptorDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServiceInterceptorDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,23 +1,25 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import org.apache.hivemind.Location;
+import org.apache.hivemind.definition.ModuleDefinition;
+import org.apache.hivemind.definition.ServiceInterceptorDefinition;
import org.apache.hivemind.definition.construction.InterceptorConstructor;
/**
* Implementations of this interface may additionally implement the {@link org.apache.hivemind.Orderable}
* interface if a certain interceptor order is required.
*/
-public class ServiceInterceptorDefinition extends ExtensionDefinition
+public class ServiceInterceptorDefinitionImpl extends ExtensionDefinitionImpl implements ServiceInterceptorDefinition
{
private InterceptorConstructor _interceptorConstructor;
private String _name;
- public ServiceInterceptorDefinition(ModuleDefinition module)
+ public ServiceInterceptorDefinitionImpl(ModuleDefinition module)
{
super(module);
}
- public ServiceInterceptorDefinition(ModuleDefinition module, String name, Location location,
+ public ServiceInterceptorDefinitionImpl(ModuleDefinition module, String name, Location location,
InterceptorConstructor interceptorConstructor)
{
super(module, location);
@@ -25,21 +27,33 @@
_interceptorConstructor = interceptorConstructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceInterceptorDefinition#getInterceptorConstructor()
+ */
public InterceptorConstructor getInterceptorConstructor()
{
return _interceptorConstructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceInterceptorDefinition#setInterceptorConstructor(org.apache.hivemind.definition.construction.InterceptorConstructor)
+ */
public void setInterceptorConstructor(InterceptorConstructor serviceConstructor)
{
_interceptorConstructor = serviceConstructor;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceInterceptorDefinition#getName()
+ */
public String getName()
{
return _name;
}
+ /**
+ * @see org.apache.hivemind.definition.ServiceInterceptorDefinition#setName(java.lang.String)
+ */
public void setName(String name)
{
_name = name;
Copied: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServicePointDefinitionImpl.java (from r470376, hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java)
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServicePointDefinitionImpl.java?view=diff&rev=472548&p1=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java&r1=470376&p2=hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServicePointDefinitionImpl.java&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/ServicePointDefinition.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/definition/impl/ServicePointDefinitionImpl.java Wed Nov 8 09:10:43 2006
@@ -1,12 +1,17 @@
-package org.apache.hivemind.definition;
+package org.apache.hivemind.definition.impl;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.hivemind.Location;
+import org.apache.hivemind.definition.ModuleDefinition;
+import org.apache.hivemind.definition.ServiceImplementationDefinition;
+import org.apache.hivemind.definition.ServiceInterceptorDefinition;
+import org.apache.hivemind.definition.ServicePointDefinition;
+import org.apache.hivemind.definition.Visibility;
-public class ServicePointDefinition extends ExtensionPointDefinition
+public class ServicePointDefinitionImpl extends ExtensionPointDefinitionImpl implements ServicePointDefinition
{
private String _interfaceClassName;
@@ -14,32 +19,44 @@
private List _interceptors = new ArrayList();
- public ServicePointDefinition(ModuleDefinition module)
+ public ServicePointDefinitionImpl(ModuleDefinition module)
{
super(module);
}
- public ServicePointDefinition(ModuleDefinition module, String id, Location location, Visibility visibility, String interfaceClassName)
+ public ServicePointDefinitionImpl(ModuleDefinition module, String id, Location location, Visibility visibility, String interfaceClassName)
{
super(module, id, location, visibility);
_interfaceClassName = interfaceClassName;
}
+ /**
+ * @see org.apache.hivemind.definition.ServicePointDefinition#getInterfaceClassName()
+ */
public String getInterfaceClassName()
{
return _interfaceClassName;
}
+ /**
+ * @see org.apache.hivemind.definition.ServicePointDefinition#setInterfaceClassName(java.lang.String)
+ */
public void setInterfaceClassName(String interfaceClassName)
{
_interfaceClassName = interfaceClassName;
}
+ /**
+ * @see org.apache.hivemind.definition.ServicePointDefinition#getImplementations()
+ */
public List getImplementations()
{
return _implementations;
}
+ /**
+ * @see org.apache.hivemind.definition.ServicePointDefinition#getDefaultImplementation()
+ */
public ServiceImplementationDefinition getDefaultImplementation()
{
ServiceImplementationDefinition defaulImplementation = null;
@@ -57,16 +74,25 @@
return defaulImplementation;
}
+ /**
+ * @see org.apache.hivemind.definition.ServicePointDefinition#addImplementation(org.apache.hivemind.definition.ServiceImplementationDefinition)
+ */
public void addImplementation(ServiceImplementationDefinition implementation)
{
_implementations.add(implementation);
}
+ /**
+ * @see org.apache.hivemind.definition.ServicePointDefinition#getInterceptors()
+ */
public List getInterceptors()
{
return _interceptors;
}
+ /**
+ * @see org.apache.hivemind.definition.ServicePointDefinition#addInterceptor(org.apache.hivemind.definition.ServiceInterceptorDefinitionImpl)
+ */
public void addInterceptor(ServiceInterceptorDefinition interceptor)
{
_interceptors.add(interceptor);
Modified: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/CoreServicesProvider.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/CoreServicesProvider.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/CoreServicesProvider.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/CoreServicesProvider.java Wed Nov 8 09:10:43 2006
@@ -22,6 +22,7 @@
import org.apache.hivemind.definition.construction.ContributionConstructor;
import org.apache.hivemind.definition.construction.ImplementationConstructionContext;
import org.apache.hivemind.definition.construction.ImplementationConstructor;
+import org.apache.hivemind.definition.impl.ModuleDefinitionImpl;
import org.apache.hivemind.impl.servicemodel.PooledServiceModelFactory;
import org.apache.hivemind.impl.servicemodel.PrimitiveServiceModelFactory;
import org.apache.hivemind.impl.servicemodel.SingletonServiceModelFactory;
@@ -68,7 +69,7 @@
ModuleDefinition md = registryDefinition.getModule("hivemind");
if (md == null)
{
- md = new ModuleDefinition("hivemind", HiveMind.getClassLocation(getClass(), resolver),
+ md = new ModuleDefinitionImpl("hivemind", HiveMind.getClassLocation(getClass(), resolver),
resolver, null);
registryDefinition.addModule(md);
}
Modified: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureConstructor.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureConstructor.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureConstructor.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureConstructor.java Wed Nov 8 09:10:43 2006
@@ -21,7 +21,6 @@
import java.util.Map.Entry;
import org.apache.commons.logging.Log;
-import org.apache.hivemind.ApplicationRuntimeException;
import org.apache.hivemind.ErrorHandler;
import org.apache.hivemind.ShutdownCoordinator;
import org.apache.hivemind.definition.ConfigurationPointDefinition;
@@ -32,11 +31,12 @@
import org.apache.hivemind.definition.ServiceImplementationDefinition;
import org.apache.hivemind.definition.ServiceInterceptorDefinition;
import org.apache.hivemind.definition.ServicePointDefinition;
+import org.apache.hivemind.definition.impl.ModuleDefinitionImpl;
import org.apache.hivemind.internal.Module;
import org.apache.hivemind.internal.RegistryInfrastructure;
/**
- * Fed a series of {@link org.apache.hivemind.parse.ModuleDefinition}s, this class will assemble
+ * Fed a series of {@link org.apache.hivemind.parse.ModuleDefinitionImpl}s, this class will assemble
* them into a final {@link org.apache.hivemind.internal.RegistryInfrastructure} as well as perform
* some validations.
* <p>
@@ -69,7 +69,7 @@
/**
* Constructs the registry infrastructure, based on data collected during the prior calls to
- * {@link #addModuleDefinition(ModuleDefinition)}. Expects that all post-processing of the
+ * {@link #addModuleDefinition(ModuleDefinitionImpl)}. Expects that all post-processing of the
* {@link RegistryAssembly} has already occured.
*/
public RegistryInfrastructure constructRegistryInfrastructure(RegistryDefinition definition)
Modified: hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServicePointImpl.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServicePointImpl.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServicePointImpl.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServicePointImpl.java Wed Nov 8 09:10:43 2006
@@ -27,6 +27,7 @@
import org.apache.hivemind.definition.ServiceInterceptorDefinition;
import org.apache.hivemind.definition.ServicePointDefinition;
import org.apache.hivemind.definition.construction.ImplementationConstructor;
+import org.apache.hivemind.definition.impl.ServiceInterceptorDefinitionImpl;
import org.apache.hivemind.events.RegistryShutdownListener;
import org.apache.hivemind.internal.Module;
import org.apache.hivemind.internal.ServiceModel;
Modified: hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/FrameworkTestCase.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/FrameworkTestCase.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/FrameworkTestCase.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/FrameworkTestCase.java Wed Nov 8 09:10:43 2006
@@ -22,8 +22,11 @@
import org.apache.hivemind.definition.ConfigurationPointDefinition;
import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.ServiceImplementationDefinition;
-import org.apache.hivemind.definition.ServicePointDefinition;
import org.apache.hivemind.definition.Visibility;
+import org.apache.hivemind.definition.impl.ConfigurationPointDefinitionImpl;
+import org.apache.hivemind.definition.impl.ModuleDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServiceImplementationDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServicePointDefinitionImpl;
import org.apache.hivemind.impl.CreateClassServiceConstructor;
import org.apache.hivemind.impl.DefaultClassResolver;
import org.apache.hivemind.test.HiveMindTestCase;
@@ -59,22 +62,22 @@
/**
* Convenience method for creating a
- * {@link ModuleDefinition}.
+ * {@link ModuleDefinitionImpl}.
*/
protected ModuleDefinition createModuleDefinition(String moduleId)
{
- ModuleDefinition result = new ModuleDefinition(moduleId, newLocation(),
+ ModuleDefinition result = new ModuleDefinitionImpl(moduleId, newLocation(),
getClassResolver(), "");
return result;
}
/**
- * Convenience method for creating a {@link ServicePointDefinition}.
+ * Convenience method for creating a {@link ServicePointDefinitionImpl}.
*/
- protected ServicePointDefinition createServicePointDefinition(ModuleDefinition module, String pointId, Class serviceInterface)
+ protected ServicePointDefinitionImpl createServicePointDefinition(ModuleDefinition module, String pointId, Class serviceInterface)
{
- ServicePointDefinition result = new ServicePointDefinition(module, pointId,
+ ServicePointDefinitionImpl result = new ServicePointDefinitionImpl(module, pointId,
newLocation(), Visibility.PUBLIC, serviceInterface.getName());
return result;
@@ -85,7 +88,7 @@
*/
protected ServiceImplementationDefinition createServiceImplementationDefinition(ModuleDefinition module, Class serviceImplementationClass)
{
- ServiceImplementationDefinition result = new ServiceImplementationDefinition(module, newLocation(),
+ ServiceImplementationDefinition result = new ServiceImplementationDefinitionImpl(module, newLocation(),
new CreateClassServiceConstructor(newLocation(), serviceImplementationClass.getName()),
"singleton", true);
@@ -97,7 +100,7 @@
*/
protected ConfigurationPointDefinition createConfigurationPointDefinition(ModuleDefinition module, String pointId)
{
- ConfigurationPointDefinition result = new ConfigurationPointDefinition(module, pointId,
+ ConfigurationPointDefinitionImpl result = new ConfigurationPointDefinitionImpl(module, pointId,
newLocation(), Visibility.PUBLIC, null, ArrayList.class.getName(),
Occurances.UNBOUNDED);
Modified: hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/TestServicesByInterface.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/TestServicesByInterface.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/TestServicesByInterface.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/TestServicesByInterface.java Wed Nov 8 09:10:43 2006
@@ -18,7 +18,7 @@
import org.apache.hivemind.Registry;
import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.ServiceImplementationDefinition;
-import org.apache.hivemind.definition.ServicePointDefinition;
+import org.apache.hivemind.definition.impl.ServicePointDefinitionImpl;
/**
* Tests the Registry.getService(java.lang.Class) functionality.
@@ -35,19 +35,19 @@
ModuleDefinition module = createModuleDefinition("hivemind.tests.serviceByInterface");
- ServicePointDefinition sp1 = createServicePointDefinition(module, "uniqueService", IUniqueService.class);
+ ServicePointDefinitionImpl sp1 = createServicePointDefinition(module, "uniqueService", IUniqueService.class);
ServiceImplementationDefinition impl1 = createServiceImplementationDefinition(module, UniqueServiceImpl.class);
sp1.addImplementation(impl1);
module.addServicePoint(sp1);
- ServicePointDefinition sp2 = createServicePointDefinition(module, "multipleServiceOne", IMultipleService.class);
+ ServicePointDefinitionImpl sp2 = createServicePointDefinition(module, "multipleServiceOne", IMultipleService.class);
ServiceImplementationDefinition impl2 = createServiceImplementationDefinition(module, MultipleServiceImpl.class);
sp2.addImplementation(impl2);
module.addServicePoint(sp2);
- ServicePointDefinition sp3 = createServicePointDefinition(module, "multipleServiceTwo", IMultipleService.class);
+ ServicePointDefinitionImpl sp3 = createServicePointDefinition(module, "multipleServiceTwo", IMultipleService.class);
sp3.addImplementation(impl2);
module.addServicePoint(sp3);
Modified: hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/SimpleModule.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/SimpleModule.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/SimpleModule.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/SimpleModule.java Wed Nov 8 09:10:43 2006
@@ -4,9 +4,9 @@
import org.apache.hivemind.Location;
import org.apache.hivemind.Resource;
-import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.ModuleDefinitionHelper;
import org.apache.hivemind.definition.ServicePointDefinition;
+import org.apache.hivemind.definition.impl.ModuleDefinitionImpl;
import org.apache.hivemind.impl.DefaultClassResolver;
import org.apache.hivemind.impl.LocationImpl;
import org.apache.hivemind.internal.ServiceModel;
@@ -15,7 +15,7 @@
/**
* Defines a module with one service.
*/
-public class SimpleModule extends ModuleDefinition
+public class SimpleModule extends ModuleDefinitionImpl
{
public SimpleModule()
{
Modified: hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/StringHolderModule.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/StringHolderModule.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/StringHolderModule.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/StringHolderModule.java Wed Nov 8 09:10:43 2006
@@ -5,11 +5,12 @@
import java.util.Collections;
import org.apache.hivemind.InterceptorStack;
-import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.ModuleDefinitionHelper;
import org.apache.hivemind.definition.ServiceInterceptorDefinition;
import org.apache.hivemind.definition.ServicePointDefinition;
import org.apache.hivemind.definition.construction.InterceptorConstructor;
+import org.apache.hivemind.definition.impl.ModuleDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServiceInterceptorDefinitionImpl;
import org.apache.hivemind.impl.DefaultClassResolver;
import org.apache.hivemind.internal.AbstractServiceInterceptorConstructor;
import org.apache.hivemind.internal.Module;
@@ -19,7 +20,7 @@
/**
* Defines a module with one threaded service. The service is intercepted by a LoggingInterceptor.
*/
-public class StringHolderModule extends ModuleDefinition
+public class StringHolderModule extends ModuleDefinitionImpl
{
public StringHolderModule(String serviceModel)
{
@@ -37,7 +38,7 @@
factory.setFactory((ClassFactory) contributingModule.getService(ClassFactory.class));
factory.createInterceptor(interceptorStack, contributingModule, Collections.emptyList());
}};
- ServiceInterceptorDefinition interceptor = new ServiceInterceptorDefinition(helper.getModule(), "hivemind.LoggingInterceptor", getLocation(), constructor);
+ ServiceInterceptorDefinition interceptor = new ServiceInterceptorDefinitionImpl(helper.getModule(), "hivemind.LoggingInterceptor", getLocation(), constructor);
sp.addInterceptor(interceptor);
}
}
Modified: hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestServices.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestServices.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestServices.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestServices.java Wed Nov 8 09:10:43 2006
@@ -31,12 +31,13 @@
import org.apache.hivemind.Registry;
import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.ModuleDefinitionHelper;
-import org.apache.hivemind.definition.OrderedServiceInterceptorDefinition;
import org.apache.hivemind.definition.ServiceInterceptorDefinition;
import org.apache.hivemind.definition.ServicePointDefinition;
import org.apache.hivemind.definition.construction.ImplementationConstructionContext;
import org.apache.hivemind.definition.construction.ImplementationConstructor;
import org.apache.hivemind.definition.construction.InterceptorConstructor;
+import org.apache.hivemind.definition.impl.OrderedServiceInterceptorDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServiceInterceptorDefinitionImpl;
import org.apache.hivemind.internal.AbstractServiceImplementationConstructor;
import org.apache.hivemind.internal.AbstractServiceInterceptorConstructor;
import org.apache.hivemind.internal.Module;
@@ -92,11 +93,11 @@
ModuleDefinition module = new SimpleModule();
ServicePointDefinition servicePoint = module.getServicePoint("Simple");
- ServiceInterceptorDefinition interceptor1 = new OrderedServiceInterceptorDefinition(module, "Fred", newLocation(), new TrackerServiceInterceptorConstructor("Fred"), "Barney", null);
+ ServiceInterceptorDefinition interceptor1 = new OrderedServiceInterceptorDefinitionImpl(module, "Fred", newLocation(), new TrackerServiceInterceptorConstructor("Fred"), "Barney", null);
servicePoint.addInterceptor(interceptor1);
- ServiceInterceptorDefinition interceptor2 = new OrderedServiceInterceptorDefinition(module, "Barney", newLocation(), new TrackerServiceInterceptorConstructor("Barney"), null, null);
+ ServiceInterceptorDefinition interceptor2 = new OrderedServiceInterceptorDefinitionImpl(module, "Barney", newLocation(), new TrackerServiceInterceptorConstructor("Barney"), null, null);
servicePoint.addInterceptor(interceptor2);
- ServiceInterceptorDefinition interceptor3 = new OrderedServiceInterceptorDefinition(module, "Wilma", newLocation(), new TrackerServiceInterceptorConstructor("Wilma"), null, "Barney");
+ ServiceInterceptorDefinition interceptor3 = new OrderedServiceInterceptorDefinitionImpl(module, "Wilma", newLocation(), new TrackerServiceInterceptorConstructor("Wilma"), null, "Barney");
servicePoint.addInterceptor(interceptor3);
Registry r =
@@ -201,7 +202,7 @@
factory.setFactory((ClassFactory) contributingModule.getService(ClassFactory.class));
factory.createInterceptor(interceptorStack, contributingModule, interceptedMethods);
}};
- ServiceInterceptorDefinition interceptor = new ServiceInterceptorDefinition(module, "hivemind.LoggingInterceptor", module.getLocation(), constructor);
+ ServiceInterceptorDefinition interceptor = new ServiceInterceptorDefinitionImpl(module, "hivemind.LoggingInterceptor", module.getLocation(), constructor);
sp.addInterceptor(interceptor);
return buildFrameworkRegistry(module);
}
Modified: hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestShutdown.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestShutdown.java?view=diff&rev=472548&r1=472547&r2=472548
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestShutdown.java (original)
+++ hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/services/TestShutdown.java Wed Nov 8 09:10:43 2006
@@ -21,9 +21,10 @@
import org.apache.hivemind.Registry;
import org.apache.hivemind.definition.ModuleDefinition;
import org.apache.hivemind.definition.ServiceImplementationDefinition;
-import org.apache.hivemind.definition.ServicePointDefinition;
import org.apache.hivemind.definition.construction.ImplementationConstructionContext;
import org.apache.hivemind.definition.construction.ImplementationConstructor;
+import org.apache.hivemind.definition.impl.ServiceImplementationDefinitionImpl;
+import org.apache.hivemind.definition.impl.ServicePointDefinitionImpl;
import org.apache.hivemind.events.RegistryShutdownListener;
import org.apache.hivemind.internal.AbstractServiceImplementationConstructor;
import org.apache.hivemind.internal.ServiceModel;
@@ -154,7 +155,7 @@
{
ModuleDefinition module = createModuleDefinition("module1");
- ServicePointDefinition sp1 = createServicePointDefinition(module, "Listener", Runnable.class);
+ ServicePointDefinitionImpl sp1 = createServicePointDefinition(module, "Listener", Runnable.class);
ImplementationConstructor constructor = new AbstractServiceImplementationConstructor(newLocation()) {
@@ -165,7 +166,7 @@
return result;
}};
- ServiceImplementationDefinition impl = new ServiceImplementationDefinition(module, newLocation(),
+ ServiceImplementationDefinition impl = new ServiceImplementationDefinitionImpl(module, newLocation(),
constructor, serviceModel, true);
sp1.addImplementation(impl);
module.addServicePoint(sp1);