[savara-commits] savara SVN: r554 - in branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common: osgi and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Jan 7 14:18:56 EST 2011
Author: objectiser
Date: 2011-01-07 14:18:56 -0500 (Fri, 07 Jan 2011)
New Revision: 554
Added:
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/Activator.java
Removed:
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/Activator.java
Log:
Copied: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi (from rev 502, branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/core/osgi)
Deleted: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/Activator.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/core/osgi/Activator.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/Activator.java 2011-01-07 19:18:56 UTC (rev 554)
@@ -1,30 +0,0 @@
-package org.savara.core.osgi;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/Activator.java (from rev 518, branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/core/osgi/Activator.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/Activator.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/osgi/Activator.java 2011-01-07 19:18:56 UTC (rev 554)
@@ -0,0 +1,47 @@
+package org.savara.common.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.scribble.protocol.parser.ProtocolParserManager;
+import org.scribble.protocol.projection.ProtocolProjector;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+
+ // Initialize the protocol parser manager
+ ServiceReference sref=context.getServiceReference(ProtocolParserManager.class.getName());
+
+ ProtocolParserManager ppm=(ProtocolParserManager)context.getService(sref);
+
+ org.savara.common.util.ScribbleServices.setParserManager(ppm);
+
+ // Initialize the protocol projector
+ sref=context.getServiceReference(ProtocolProjector.class.getName());
+
+ ProtocolProjector pp=(ProtocolProjector)context.getService(sref);
+
+ org.savara.common.util.ScribbleServices.setProtocolProjector(pp);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
More information about the savara-commits
mailing list