Skip to content

Commit

Permalink
Optimize ManagedType
Browse files Browse the repository at this point in the history
Make use of IPojoContext to benefit from iPojo's
internal event dispatcher
  • Loading branch information
TheItivitist committed Apr 12, 2022
1 parent 62a67c5 commit 7b778e6
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@

import static java.lang.String.format;

import org.apache.felix.ipojo.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import org.apache.felix.ipojo.ComponentInstance;
import org.apache.felix.ipojo.ConfigurationException;
import org.apache.felix.ipojo.Factory;
import org.apache.felix.ipojo.FactoryStateListener;
import org.apache.felix.ipojo.IPojoContext;
import org.apache.felix.ipojo.IPojoFactory;
import org.apache.felix.ipojo.MissingHandlerException;
import org.apache.felix.ipojo.UnacceptableConfiguration;
import org.apache.felix.ipojo.extender.ExtensionDeclaration;
import org.apache.felix.ipojo.extender.InstanceDeclaration;
import org.apache.felix.ipojo.extender.TypeDeclaration;
Expand All @@ -36,9 +45,6 @@
import org.osgi.util.tracker.ServiceTracker;
import org.osgi.util.tracker.ServiceTrackerCustomizer;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

/**
* This class is responsible to create the factory for a given type declaration. It also instructs the factories to
* create
Expand Down Expand Up @@ -93,7 +99,7 @@ public class ManagedType implements FactoryStateListener, Lifecycle {
* @param declaration the declaration
*/
public ManagedType(BundleContext bundleContext, QueueService queueService, TypeDeclaration declaration) {
m_bundleContext = bundleContext;
m_bundleContext = new IPojoContext(bundleContext);
m_queueService = queueService;
m_declaration = declaration;
try {
Expand Down

0 comments on commit 7b778e6

Please sign in to comment.