You can subscribe to this list here.
| 2007 |
Jan
(31) |
Feb
(54) |
Mar
(27) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <ri...@us...> - 2007-03-07 08:54:37
|
Revision: 113
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=113&view=rev
Author: rickles
Date: 2007-03-07 00:54:36 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Checked in prototype
Added Paths:
-----------
prototype/org.digivitality.techne.shell/
prototype/org.digivitality.techne.shell/.classpath
prototype/org.digivitality.techne.shell/.project
prototype/org.digivitality.techne.shell/META-INF/
prototype/org.digivitality.techne.shell/META-INF/MANIFEST.MF
prototype/org.digivitality.techne.shell/build.properties
prototype/org.digivitality.techne.shell/build.xml
prototype/org.digivitality.techne.shell/classes/
prototype/org.digivitality.techne.shell/classes/org/
prototype/org.digivitality.techne.shell/classes/org/digivitality/
prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/
prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/
prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Activator.class
prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$1.class
prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$FelixFrameworkThread.class
prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$SubShell.class
prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell.class
prototype/org.digivitality.techne.shell/src/
prototype/org.digivitality.techne.shell/src/org/
prototype/org.digivitality.techne.shell/src/org/digivitality/
prototype/org.digivitality.techne.shell/src/org/digivitality/techne/
prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/
prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Activator.java
prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java
prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
Added: prototype/org.digivitality.techne.shell/.classpath
===================================================================
--- prototype/org.digivitality.techne.shell/.classpath (rev 0)
+++ prototype/org.digivitality.techne.shell/.classpath 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/commons-logging-1.0.4.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/felix.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/bundle/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/org.apache.felix.main-0.9.0-incubator-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.component/classes"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/classes"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Added: prototype/org.digivitality.techne.shell/.project
===================================================================
--- prototype/org.digivitality.techne.shell/.project (rev 0)
+++ prototype/org.digivitality.techne.shell/.project 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.digivitality.techne.shell</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: prototype/org.digivitality.techne.shell/META-INF/MANIFEST.MF
===================================================================
--- prototype/org.digivitality.techne.shell/META-INF/MANIFEST.MF (rev 0)
+++ prototype/org.digivitality.techne.shell/META-INF/MANIFEST.MF 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shell Plug-in
+Bundle-SymbolicName: org.digivitality.techne.shell
+Bundle-Version: 1.0.0
+Bundle-Activator: org.digivitality.techne.shell.Activator
+Bundle-Vendor: Techne
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework;version="1.3.0"
Added: prototype/org.digivitality.techne.shell/build.properties
===================================================================
--- prototype/org.digivitality.techne.shell/build.properties (rev 0)
+++ prototype/org.digivitality.techne.shell/build.properties 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = classes/
+bin.includes = META-INF/,\
+ .
Added: prototype/org.digivitality.techne.shell/build.xml
===================================================================
--- prototype/org.digivitality.techne.shell/build.xml (rev 0)
+++ prototype/org.digivitality.techne.shell/build.xml 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.digivitality.techne.shell" default="build.jars" basedir=".">
+
+ <property name="basews" value="${ws}"/>
+ <property name="baseos" value="${os}"/>
+ <property name="basearch" value="${arch}"/>
+ <property name="basenl" value="${nl}"/>
+
+ <!-- Compiler settings. -->
+ <property name="javacFailOnError" value="false"/>
+ <property name="javacDebugInfo" value="on"/>
+ <property name="javacVerbose" value="false"/>
+ <property name="logExtension" value=".log"/>
+ <property name="compilerArg" value=""/>
+ <property name="javacSource" value="1.3"/>
+ <property name="javacTarget" value="1.2"/>
+ <path id="path_bootclasspath">
+ <fileset dir="${java.home}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <property name="bootclasspath" refid="path_bootclasspath"/>
+ <property name="bundleJavacSource" value="${javacSource}"/>
+ <property name="bundleJavacTarget" value="${javacTarget}"/>
+ <property name="bundleBootClasspath" value="${bootclasspath}"/>
+
+ <target name="init" depends="properties">
+ <condition property="pluginTemp" value="${buildTempFolder}/plugins">
+ <isset property="buildTempFolder"/>
+ </condition>
+ <property name="pluginTemp" value="${basedir}"/>
+ <condition property="build.result.folder" value="${pluginTemp}/org.digivitality.techne.shell">
+ <isset property="buildTempFolder"/>
+ </condition>
+ <property name="build.result.folder" value="${basedir}"/>
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="plugin.destination" value="${basedir}"/>
+ </target>
+
+ <target name="properties" if="eclipse.running">
+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+
+ </target>
+
+ <target name="build.update.jar" depends="init" description="Build the plug-in: org.digivitality.techne.shell for an update site.">
+ <delete dir="${temp.folder}"/>
+ <mkdir dir="${temp.folder}"/>
+ <antcall target="build.jars"/>
+ <antcall target="gather.bin.parts">
+ <param name="destination.temp.folder" value="${temp.folder}/"/>
+ </antcall>
+ <zip destfile="${plugin.destination}/org.digivitality.techne.shell_1.0.0.jar" basedir="${temp.folder}/org.digivitality.techne.shell_1.0.0" filesonly="false" whenempty="skip" update="false"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="@dot" depends="init" unless="@dot" description="Create jar: org.digivitality.techne.shell @dot.">
+ <delete dir="${temp.folder}/@dot.bin"/>
+ <mkdir dir="${temp.folder}/@dot.bin"/>
+ <path id="@dot.classpath">
+ <pathelement path="../../../../../../eclipse-wbt-3.2/eclipse/plugins/org.eclipse.osgi_3.2.0.v20060601.jar"/>
+ </path>
+ <!-- compile the source code -->
+ <javac destdir="${temp.folder}/@dot.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" >
+ <compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
+ <classpath refid="@dot.classpath" />
+ <src path="src/" />
+ <compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ <compilerarg line="-log '${temp.folder}/@dot.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ </javac>
+ <!-- Copy necessary resources -->
+ <copy todir="${temp.folder}/@dot.bin" failonerror="true" overwrite="false">
+ <fileset dir="src/" excludes="**/*.java, **/package.htm*" />
+ </copy>
+ <mkdir dir="${build.result.folder}"/>
+ <copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false">
+ <fileset dir="${temp.folder}/@dot.bin" />
+ </copy>
+ <delete dir="${temp.folder}/@dot.bin"/>
+ </target>
+
+ <target name="src.zip" depends="init" unless="src.zip">
+ <mkdir dir="${build.result.folder}"/>
+ <zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">
+ <fileset dir="src/" includes="**/*.java" />
+ </zip>
+ </target>
+
+ <target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.digivitality.techne.shell.">
+ <available property="@dot" file="${build.result.folder}/@dot"/>
+ <antcall target="@dot"/>
+ </target>
+
+ <target name="build.sources" depends="init">
+ <available property="src.zip" file="${build.result.folder}/src.zip"/>
+ <antcall target="src.zip"/>
+ </target>
+
+ <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
+ <mkdir dir="${destination.temp.folder}/org.digivitality.techne.shell_1.0.0"/>
+ <copy todir="${destination.temp.folder}/org.digivitality.techne.shell_1.0.0" failonerror="true" overwrite="false">
+ <fileset dir="${build.result.folder}/@dot" includes="**" />
+ </copy>
+ <copy todir="${destination.temp.folder}/org.digivitality.techne.shell_1.0.0" failonerror="true" overwrite="false">
+ <fileset dir="${basedir}" includes="META-INF/" />
+ </copy>
+ </target>
+
+ <target name="build.zips" depends="init">
+ </target>
+
+ <target name="gather.sources" depends="init" if="destination.temp.folder">
+ <mkdir dir="${destination.temp.folder}/org.digivitality.techne.shell_1.0.0"/>
+ <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/org.digivitality.techne.shell_1.0.0" failonerror="false" overwrite="false"/>
+ </target>
+
+ <target name="gather.logs" depends="init" if="destination.temp.folder">
+ <mkdir dir="${destination.temp.folder}/org.digivitality.techne.shell_1.0.0"/>
+ <copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/org.digivitality.techne.shell_1.0.0" failonerror="false" overwrite="false"/>
+ </target>
+
+ <target name="clean" depends="init" description="Clean the plug-in: org.digivitality.techne.shell of all the zips, jars and logs created.">
+ <delete dir="${build.result.folder}/@dot"/>
+ <delete file="${build.result.folder}/src.zip"/>
+ <delete file="${plugin.destination}/org.digivitality.techne.shell_1.0.0.jar"/>
+ <delete file="${plugin.destination}/org.digivitality.techne.shell_1.0.0.zip"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
+ <eclipse.convertPath fileSystemPath="C:/Workspace/eclipse-3.2/techne/sandbox/rickles/org.digivitality.techne.shell" property="resourcePath"/>
+ <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
+ </target>
+
+ <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.digivitality.techne.shell.">
+ <delete dir="${temp.folder}"/>
+ <mkdir dir="${temp.folder}"/>
+ <antcall target="build.jars"/>
+ <antcall target="build.sources"/>
+ <antcall target="gather.bin.parts">
+ <param name="destination.temp.folder" value="${temp.folder}/"/>
+ </antcall>
+ <antcall target="gather.sources">
+ <param name="destination.temp.folder" value="${temp.folder}/"/>
+ </antcall>
+ <delete>
+ <fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
+ </delete>
+ <zip destfile="${plugin.destination}/org.digivitality.techne.shell_1.0.0.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+</project>
Added: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Activator.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Activator.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$1.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$1.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$FelixFrameworkThread.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$FelixFrameworkThread.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$SubShell.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell$SubShell.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.shell/classes/org/digivitality/techne/shell/Shell.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Activator.java
===================================================================
--- prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Activator.java (rev 0)
+++ prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Activator.java 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,24 @@
+package org.digivitality.techne.shell;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ System.out.println("Hello World!!");
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ System.out.println("Goodbye World!!");
+ }
+
+}
Added: prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java
===================================================================
--- prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java (rev 0)
+++ prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,36 @@
+/**
+ *
+ */
+package org.digivitality.techne.shell;
+
+import org.apache.log4j.*;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.impl.Log4JLogger;
+
+import org.digivitality.techne.shell.*;
+import org.digivitality.techne.launch.felix.*;
+
+/**
+ * Generic starter.
+ *
+ * @author Rick Litton
+ *
+ */
+public class Main {
+
+ static Log logger = LogFactory.getLog(Main.class);
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ (LogFactory.getLog(Main.class)).info("user.dir = " + System.getProperty("user.dir"));
+ Shell container = new Shell();
+ container.init();
+ /* test to run launcher directly */
+ //FelixLauncher l = new FelixLauncher();
+ //l.launch();
+ }
+
+}
Added: prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
===================================================================
--- prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java (rev 0)
+++ prototype/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-03-07 08:54:36 UTC (rev 113)
@@ -0,0 +1,623 @@
+/**
+ *
+ */
+package org.digivitality.techne.shell;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+import java.lang.reflect.Method;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.FrameworkListener;
+import org.osgi.framework.ServiceReference;
+import org.apache.felix.shell.ShellService;
+import org.apache.felix.framework.*;
+
+import org.digivitality.techne.component.ComponentManager;
+import org.digivitality.techne.component.Feature;
+import org.digivitality.techne.component.Fragment;
+import org.digivitality.techne.component.interfaces.Component;
+import org.digivitality.techne.core.ContainerFactory;
+import org.digivitality.techne.core.FunctionalArchiveImpl;
+import org.digivitality.techne.core.interfaces.ContainerInstance;
+import org.digivitality.techne.core.interfaces.FunctionalArchive;
+import org.digivitality.techne.core.util.bundle;
+import org.digivitality.techne.core.util.containertype;
+import org.digivitality.techne.launch.felix.*;
+
+/**
+ * This is intended to demonstrate the concept of a container shell.
+ * To set the framework, type 'set framework to Felix' on the command prompt.
+ *
+ * @author Rick Liton
+ *
+ */
+public class Shell implements FrameworkListener {
+
+ private static boolean FRAMEWORK_SET;
+ private String profile = "Peter";
+ private static String DEFAULT_CONTAINER_TYPE = "basic";
+ protected static final Log logger = LogFactory.getLog(Shell.class);
+ private boolean stopping = false;
+ private ContainerFactory containerFactory;
+ protected Thread techneThread;
+ private Thread frameworkThread;
+ protected FelixLauncher launcher;
+ protected FelixFrameworkThread felix;
+ private static Method executeCommand;
+ private BundleContext context;
+ protected Shell container;
+ private List containerInstances;
+ private List bundleList;
+ private String containerType = "basic";
+ private ComponentManager cm = new ComponentManager();
+ private int componentId = 4;
+ static int FIELD_LEN = 11;
+ private int farId = 0;
+ protected String prompt = "techne> ";
+
+ public Shell() {
+
+ }
+
+ public void init() {
+ container = this;
+ System.out.println("\n===============================================================================\n");
+ System.out.println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
+ System.out.println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNNN NNNNN EEEEEEEEE");
+ System.out.println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNNNNNNNNN EEEEE");
+ System.out.println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNNN EEEEEEEE");
+ System.out.println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNN EEEEEEEE");
+ System.out.println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNN NNNNN EEEEE");
+ System.out.println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
+ System.out.println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE\n");
+ System.out.println(" WELCOME TO THE TECHNE SHELL!");
+ System.out.println("===============================================================================\n\n");
+ System.out.println("Your default profile is " + profile + ".");
+ System.out.println("Please select a framework by executing the `set framework to' command");
+ System.out.println("or specify it in your techne.properties file.\n\n");
+ execute();
+ }
+
+ public void execute() {
+ final Runnable shell = new Runnable() {
+
+ public void run() {
+ String line = null;
+ BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
+
+ while (!stopping)
+ {
+ System.out.print(prompt);
+
+ try {
+ line = in.readLine();
+ } catch (IOException ex) {
+ System.err.println("Could not read input, please try again.");
+ continue;
+ }
+
+ synchronized (Shell.this)
+ {
+ if (line == null)
+ {
+ continue;
+ }
+
+ line = line.trim();
+
+ if (line.length() == 0)
+ {
+ continue;
+ }
+
+ try {
+ runCommand(line, System.out, System.err);
+ } catch (Exception ex) {
+ System.err.println("ERROR: " + ex);
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ /*
+ * Will use Command pattern later on.
+ */
+ public void runCommand(String line, PrintStream out, PrintStream err) {
+
+ if (line.equals("set framework to Felix")) {
+ if (FRAMEWORK_SET) {
+ out.print("Framework has already been set to Felix\n");
+ } else {
+ felix = new FelixFrameworkThread();
+ frameworkThread = new Thread(felix);
+ frameworkThread.setPriority(1);
+ frameworkThread.start();
+
+ try {
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ } else if (line.equals("set container type to web")) {
+ List list = containerFactory.getContainerTypes();
+ for (int i = 0; i < list.size(); i++) {
+ containertype ct = (containertype)list.get(i);
+ Map props = ct.getProperties();
+ String type = (String)props.get("value");
+ if (type.equals("web")) {
+ bundleList = ct.getBundles();
+ for (int j = 0; j < bundleList.size(); j++) {
+ bundle b = (bundle)bundleList.get(j);
+ Map p = b.getProperties();
+ execute("start " + p.get("url"), System.out, System.out);
+ }
+ }
+ }
+ containerType = "web";
+ } else if (line.equals("set container type to basic") || line.equals("set container type to default")) {
+ if (containerType.equals("web")) {
+ int id = 4;
+ for (int j = 0; j < bundleList.size(); j++) {
+ execute("uninstall " + id, System.out, System.out);
+ id++;
+ }
+ }
+ containerType = "basic";
+ } else if (line.equals("show container type")) {
+ System.out.println("Container type is " + containerType);
+ } else if (line.equals("show bundles")) {
+ execute("ps", System.out, System.out);
+ } else if (line.equals("show components")) {
+ Object[] objs = cm.getComponents().toArray();
+ List fragments = new ArrayList();
+ List features = new ArrayList();
+ printHeaders();
+ for (int i = 0; i < objs.length; i++) {
+ ArrayList list = (ArrayList)objs[i];
+ Object[] components = list.toArray();
+ for (int j = 0; j < components.length; j++){
+ if (components[j] instanceof org.digivitality.techne.component.Fragment)
+ fragments.add(components[j]);
+ else if (components[j] instanceof org.digivitality.techne.component.Feature)
+ features.add(components[j]);
+ }
+ }
+ displayComponents(fragments, features, null);
+ } else if (line.startsWith("create fragment ")) {
+ int pos1 = line.indexOf('\'');
+ int pos2 = line.lastIndexOf('\'');
+ int pos3 = line.lastIndexOf("using ");
+ String name = line.substring(pos1 + 1, pos2);
+ String url = line.substring(pos3 + 6);
+ File file = new File(url);
+ //System.out.println("url: " + url);
+ try {
+ Fragment f = new Fragment(name, file.toURL(), "1.0", Integer.toString(componentId));
+ componentId++;
+ System.out.println("Fragment " + f.getName() + " with id " + f.getId() + " created");
+ cm.addFragment(f);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else if (line.startsWith("create feature ")) {
+ int pos1 = line.indexOf('\'');
+ int pos2 = line.lastIndexOf('\'');
+ int pos3 = line.lastIndexOf("using ");
+ String name = line.substring(pos1 + 1, pos2);
+ try {
+ Feature ft = new Feature(name, "1.0", Integer.toString(componentId));
+ componentId++;
+ System.out.println("Feature " + ft.getName() + " with id " + ft.getId() + " created");
+ cm.addFeature(ft);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else if (line.startsWith("add component")) {
+ String[] tokens = line.split(" ");
+ String id = tokens[2];
+ int pos1 = line.indexOf('\'');
+ int pos2 = line.lastIndexOf('\'');
+ String farName = line.substring(pos1 + 1, pos2);
+ FunctionalArchive far = null;
+ try {
+ far = (FunctionalArchive)cm.find(farName);
+ far.add(cm.getComponent(id));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println("Component " + id + " added to far '" + far.getName() + "' for assembly");
+ } else if (line.startsWith("add ")) {
+ String[] tokens = line.split(" ");
+ //System.out.println("Number of tokens: " + tokens.length);
+ String id = tokens[1];
+ StringBuffer sb = new StringBuffer();
+ for (int i = 3; i < tokens.length; i++) {
+ sb.append(tokens[i]);
+ // there's more
+ if (i < tokens.length)
+ sb.append(" ");
+ }
+ String feature = sb.toString();
+ System.out.println("feature = " + feature);
+ // right now, assume all components to be added are fragments
+ Fragment f = cm.addFragmentToFeature(id, feature);
+ System.out.println("Added fragment " + f.getName() + " to " + feature);
+ } else if (line.equals("show container")) {
+ printHeaders();
+ displayContainer();
+ } else if (line.startsWith("show far")) {
+ String[] tokens = line.split(" ");
+ String id = tokens[2];
+ int pos1 = line.indexOf('\'');
+ int pos2 = line.lastIndexOf('\'');
+ String farName = line.substring(pos1 + 1, pos2);
+ FunctionalArchive far = null;
+ try {
+ far = (FunctionalArchive)cm.find(farName);
+ System.out.println("Info: Enter sub-shell to view the FAR assembly");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else if (line.startsWith("create far")) {
+ int pos1 = line.indexOf('\'');
+ int pos2 = line.lastIndexOf('\'');
+ String name = line.substring(pos1 + 1, pos2);
+ try {
+ FunctionalArchive far = new FunctionalArchiveImpl(name, Integer.toString(farId));
+ componentId++;
+ System.out.println("FAR assembly `" + far.getName() + "' with id " + far.getId() + " created");
+ cm.register(far.getName(), far);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else if (line.startsWith("load")) {
+ int pos1 = line.indexOf('\'');
+ int pos2 = line.lastIndexOf('\'');
+ String source = line.substring(pos1 + 1, pos2);
+ FunctionalArchive far = (FunctionalArchive)cm.find(source);
+ String target = line.substring(pos2);
+ target = target.trim();
+ if (target.contains("to instance")) {
+ String instanceId = target.substring(14);
+ //System.out.println("instanceId = " + instanceId);
+ containerFactory.load(far, instanceId.trim());
+ }
+ System.out.println("FAR assembly has been loaded.");
+ } else if (line.startsWith("switch to")) {
+ String instanceId = line.substring(10);
+ System.out.println("instanceName = " + instanceId);
+ ContainerInstance ci = containerFactory.getContainerInstance(instanceId);
+ //Thread t = ci.getInstanceThread();
+ try {
+ Thread t = new Thread(new SubShell(ci));
+ t.start();
+ try {
+ t.join();
+ } catch (InterruptedException ioe) {
+ ioe.printStackTrace();
+ }
+ } catch (Exception e) {
+ System.out.println("Error: No far assembly loaded. Load far and try again.");
+ }
+ } else if (line.equals("exit") || line.equals("quit")) {
+ stopping = true;
+ try {
+ Runtime.getRuntime().halt(0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ System.exit(0);
+ }
+ } else { // assume that it is a framework command
+ //out.print("Unsupported command. Please try another command.\n");
+ execute(line, System.out, System.out);
+ }
+ }
+ };
+ techneThread = new Thread(shell);
+ techneThread.setPriority(5);
+ techneThread.start();
+ }
+
+ private void execute(String line, PrintStream in, PrintStream out) {
+ ShellService shell = null;
+ try {
+ Object[] args = {line, in, out};
+ ServiceReference ref = context.getServiceReference(ShellService.class.getName());
+ if (ref!=null) {
+ Object o = context.getService(ref);
+ System.out.println("o: " + o.getClass().getName() + " cl: " + o.getClass().getClassLoader());
+ Class[] parameterTypes={String.class,PrintStream.class,PrintStream.class};
+ executeCommand = o.getClass().getDeclaredMethod("executeCommand", parameterTypes);
+ executeCommand.setAccessible(true);
+ executeCommand.invoke(o, args);
+ }
+ } catch (NullPointerException npe) {
+ logger.warn("Could not invoke execute method: ", npe);
+ System.out.println("Cannot execute framework command. Please select a framework.");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public String getContainerType() {
+ return containerType;
+ }
+
+ public static BundleContext getBundleContext(Bundle bundle) {
+ try {
+ Class clazz = bundle.getClass();
+ Method m = clazz.getDeclaredMethod("getContext", new Class[0]);
+ m.setAccessible(true);
+ return (BundleContext) m.invoke(bundle, new Object[0]);
+ } catch (Exception e) {
+ logger.error("getBundleContext failed", e);
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ class FelixFrameworkThread implements Runnable {
+
+ Bundle[] bundles;
+
+ public void run() {
+ try {
+ launcher = new FelixLauncher();
+ launcher.launch();
+ setContainer();
+ System.out.print(prompt);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /*
+ public Bundle[] getBundles() {
+ return launcher.getBundles();
+ }
+
+ public Object getService(Bundle b, ServiceReference ref) {
+ return launcher.getService(b, ref);
+ }
+ */
+ }
+
+ class SubShell implements Runnable {
+
+ private String name;
+ private ContainerInstance instance;
+ public boolean waiting;
+ private FunctionalArchive far;
+
+ SubShell(ContainerInstance instance) {
+ this.instance = instance;
+ far = instance.getFAR();
+ setName(far.getName());
+ prompt();
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void prompt() {
+ prompt = name + "> ";
+ }
+
+ public void run() {
+ String line = null;
+ BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
+
+ while (true)
+ {
+ System.out.print(prompt);
+
+ try {
+ line = in.readLine();
+ } catch (IOException ex) {
+ System.err.println("Could not read input, please try again.");
+ continue;
+ }
+
+ synchronized (SubShell.this)
+ {
+ if (line == null)
+ {
+ continue;
+ }
+
+ line = line.trim();
+
+ if (line.length() == 0)
+ {
+ continue;
+ }
+
+ try {
+ subCommand(line, System.out, System.err);
+ if (waiting)
+ break;
+ } catch (Exception ex) {
+ System.err.println("ERROR: " + ex);
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private void subCommand(String line, PrintStream in, PrintStream out) {
+ if (line.equals("exit")) {
+ System.out.println("Exiting this instance... ");
+ prompt = "techne> ";
+ waiting = true;
+ try {
+ Thread t = Thread.currentThread();
+ t.interrupt();
+ //t = null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else if (line.equals("show instance")) {
+ displayInstance();
+ }
+ }
+
+ private void displayInstance() {
+ List list = far.getComponents();
+ Iterator iter = list.iterator();
+ printHeaders();
+ while (iter.hasNext()) {
+ Component c = (Component)iter.next();
+ String n = c.getName();
+ String s = c.getState();
+ String v = c.getVersion();
+ String id = c.getId();
+ String t = c.getType();
+ String spad = getPadding(s);
+ String cpad = getPadding(t);
+ System.out.println("[ " + id + "] " + "[" + s + spad + "] [" + t + cpad + "] " + n + " (" + v + ")");
+ }
+ }
+ }
+
+ protected void setContainer() {
+ try {
+ Method m = Felix.class.getDeclaredMethod("getBundle", new Class[] { long.class });
+ m.setAccessible(true);
+ Bundle systemBundle = (Bundle) m.invoke(launcher.getFelix(), new Object[] { new Long(0) });
+ System.out.println("systemBundle superclass: " + systemBundle.getClass().getSuperclass().getName());
+ Method getContext = systemBundle.getClass().getSuperclass().getDeclaredMethod("getContext", null);
+ getContext.setAccessible(true);
+ context = (BundleContext) getContext.invoke(systemBundle, null);
+ System.out.println("BundleContext: " + context);
+ containerFactory = ContainerFactory.getInstance();
+ containerFactory.init(this);
+ containerInstances = containerFactory.getContainerInstances();
+ System.out.println("Available container instances: " + containerInstances.size());
+ System.out.println("Container type: " + DEFAULT_CONTAINER_TYPE);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void displayComponents(List fragments, List features, List featureSets) {
+ // display fragments, features, feature sets in this order
+ if (fragments != null) {
+ Iterator iter = fragments.iterator();
+ while (iter.hasNext()) {
+ Fragment f = (Fragment)iter.next();
+ String n = f.getName();
+ String s = f.getState();
+ String v = f.getVersion();
+ String id = f.getId();
+ System.out.println("[ " + id + "] " + "[" + s + "] [Fragment ] " + n + " (" + v + ")");
+ }
+ }
+
+ if (features != null) {
+ Iterator iter2 = features.iterator();
+ String name = null;
+ while (iter2.hasNext()) {
+ Feature ft = (Feature)iter2.next();
+ String n = ft.getName();
+ String s = ft.getState();
+ String v = ft.getVersion();
+ String id = ft.getId();
+ List list = ft.getFragments();
+ String dependency = null;
+ if (list.size() > 0) {
+ Iterator iter = list.iterator();
+ int i = 0;
+ while (iter.hasNext()) {
+ Fragment f = (Fragment)iter.next();
+ if (i == 0)
+ dependency = f.getId();
+ else
+ dependency += "," + f.getId();
+ i++;
+ }
+ dependency = " -> " + dependency;
+ }
+ if (dependency == null)
+ dependency = "";
+ if (name == null || !name.equals(n))
+ System.out.println("[ " + id + "] " + "[" + s + "] [Feature ] " + n + " (" + v + ")" + dependency);
+ //name = n;
+ }
+ }
+ }
+
+ private void displayContainer() {
+ List list = containerFactory.getContainerInstances();
+ ContainerInstance[] instances = (ContainerInstance[])list.toArray(new ContainerInstance[list.size()]);
+ //System.out.println("instances: " + instances.length);
+ for (int i = 0; i < instances.length; i++) {
+ ContainerInstance ci = (ContainerInstance)instances[i];
+ String n = ci.getName();
+ String s = ci.getState();
+ String id = ci.getId();
+ String spad = getPadding(s);
+ String cpad = getPadding(containerType);
+ FunctionalArchive far = ci.getFAR();
+ String dependency = null;
+ if (far != null)
+ dependency = " -> " + far.getName();
+ if (dependency == null)
+ dependency = "";
+ System.out.println("[ " + id + "] " + "[" + s + spad + "] [" + firstToUpper(containerType) + cpad + "] " + n + dependency);
+ ci = null;
+ }
+ }
+
+ private void printHeaders() {
+ System.out.println("START LEVEL 1");
+ System.out.println(" ID State Type Name");
+ }
+
+ private String getPadding(String s) {
+ //System.out.println("s is " + s);
+ String space = " ";
+ if (s != null) {
+ int len = FIELD_LEN - s.length();
+ char[] padding = new char[len];
+ for (int i = 0; i < len; i++) {
+ padding[i] = ' ';
+ }
+ return new String(padding);
+ }
+ return space;
+ }
+
+ private String firstToUpper(String s){
+ char[] chars = s.toCharArray();
+ String first = "" + chars[0];
+ return (first.toUpperCase() + s.substring(1));
+ }
+
+ protected Shell getContainer() {
+ System.out.println("Container: " + container);
+ return container;
+ }
+
+ /*
+ * need to create a Techne event dispatcher later
+ */
+ public void frameworkEvent(FrameworkEvent event) {
+ // will implement later
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-07 08:53:47
|
Revision: 112
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=112&view=rev
Author: rickles
Date: 2007-03-07 00:53:49 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Checked in prototype
Added Paths:
-----------
prototype/org.digivitality.techne.service/
prototype/org.digivitality.techne.service/.classpath
prototype/org.digivitality.techne.service/.project
prototype/org.digivitality.techne.service/bin/
prototype/org.digivitality.techne.service/build.xml
prototype/org.digivitality.techne.service/classes/
prototype/org.digivitality.techne.service/classes/META-INF/
prototype/org.digivitality.techne.service/classes/META-INF/Manifest.mf
prototype/org.digivitality.techne.service/classes/org/
prototype/org.digivitality.techne.service/classes/org/digivitality/
prototype/org.digivitality.techne.service/classes/org/digivitality/techne/
prototype/org.digivitality.techne.service/classes/org/digivitality/techne/service/
prototype/org.digivitality.techne.service/classes/org/digivitality/techne/service/Activator.class
prototype/org.digivitality.techne.service/org.digivitality.techne.service-1.0.0.jar
prototype/org.digivitality.techne.service/src/
prototype/org.digivitality.techne.service/src/META-INF/
prototype/org.digivitality.techne.service/src/META-INF/Manifest.mf
prototype/org.digivitality.techne.service/src/org/
prototype/org.digivitality.techne.service/src/org/digivitality/
prototype/org.digivitality.techne.service/src/org/digivitality/techne/
prototype/org.digivitality.techne.service/src/org/digivitality/techne/service/
prototype/org.digivitality.techne.service/src/org/digivitality/techne/service/Activator.java
Added: prototype/org.digivitality.techne.service/.classpath
===================================================================
--- prototype/org.digivitality.techne.service/.classpath (rev 0)
+++ prototype/org.digivitality.techne.service/.classpath 2007-03-07 08:53:49 UTC (rev 112)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry sourcepath="C:/Workspace/Projects/JAVA/ApacheFelix" kind="lib" path="/org.digivitality.techne.core/lib/felix.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/commons-logging-1.0.4.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/org.apache.felix.main-0.9.0-incubator-SNAPSHOT.jar"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Added: prototype/org.digivitality.techne.service/.project
===================================================================
--- prototype/org.digivitality.techne.service/.project (rev 0)
+++ prototype/org.digivitality.techne.service/.project 2007-03-07 08:53:49 UTC (rev 112)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.digivitality.techne.service</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: prototype/org.digivitality.techne.service/build.xml
===================================================================
--- prototype/org.digivitality.techne.service/build.xml (rev 0)
+++ prototype/org.digivitality.techne.service/build.xml 2007-03-07 08:53:49 UTC (rev 112)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="org.digivitality.techne.service" default="all" basedir=".">
+ <property name="classes.dir" value="classes"/>
+ <property name="src.dir" value="src"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="metainf.dir" value="${src.dir}/META-INF"/>
+ <property name="version" value="1.0.0"/>
+ <property name="techne.core" value="../org.digivitality.techne.core"/>
+ <property name="deploy.dir" value="${techne.core}/bin/load"/>
+
+ <target name="init">
+ <mkdir dir="${metainf.dir}"/>
+ </target>
+
+ <!-- Create the bundle. -->
+ <target name="jar" depends="init">
+ <manifest file="${metainf.dir}/Manifest.mf">
+ <attribute name="Manifest-Version" value="1.0"/>
+ <attribute name="Bundle-ManifestVersion" value="2"/>
+ <attribute name="Bundle-Name" value="Techne Service Plugin"/>
+ <attribute name="Bundle-SymbolicName" value="org.digivitality.techne.service"/>
+ <attribute name="Bundle-Version" value="1.0.0"/>
+ <attribute name="Bundle-Activator" value="org.digivitality.techne.service.Activator"/>
+ <attribute name="Import-Package" value="org.osgi.framework,org.apache.felix.shell,org.apache.commons.logging"/>
+ </manifest>
+ <jar jarfile="${ant.project.name}-${version}.jar"
+ basedir="${classes.dir}"
+ manifest="${metainf.dir}/Manifest.mf">
+ <include name="**/*"/>
+ </jar>
+ </target>
+
+ <target name="deploy">
+ <copy todir="${deploy.dir}">
+ <fileset dir="${basedir}" includes="*.jar"/>
+ </copy>
+ </target>
+
+ <target name="all" depends="init">
+ <antcall target="clean"/>
+ <antcall target="jar"/>
+ <antcall target="deploy"/>
+ </target>
+
+ <!-- Clean up everything. -->
+ <target name="clean">
+ <delete>
+ <fileset dir="${metainf.dir}"/>
+ <fileset dir="${deploy.dir}">
+ <include name="${ant.project.name}-${version}.jar"/>
+ </fileset>
+ </delete>
+ </target>
+</project>
Added: prototype/org.digivitality.techne.service/classes/META-INF/Manifest.mf
===================================================================
--- prototype/org.digivitality.techne.service/classes/META-INF/Manifest.mf (rev 0)
+++ prototype/org.digivitality.techne.service/classes/META-INF/Manifest.mf 2007-03-07 08:53:49 UTC (rev 112)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.6.5
+Created-By: 1.5.0_07-b03 (Sun Microsystems Inc.)
+Bundle-ManifestVersion: 2
+Bundle-Name: Techne Service Plugin
+Bundle-SymbolicName: org.digivitality.techne.service
+Bundle-Version: 1.0.0
+Bundle-Activator: org.digivitality.techne.service.Activator
+Import-Package: org.osgi.framework,org.apache.felix.shell,org.apache.c
+ ommons.logging
+
Added: prototype/org.digivitality.techne.service/classes/org/digivitality/techne/service/Activator.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.service/classes/org/digivitality/techne/service/Activator.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.service/org.digivitality.techne.service-1.0.0.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.service/org.digivitality.techne.service-1.0.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.service/src/META-INF/Manifest.mf
===================================================================
--- prototype/org.digivitality.techne.service/src/META-INF/Manifest.mf (rev 0)
+++ prototype/org.digivitality.techne.service/src/META-INF/Manifest.mf 2007-03-07 08:53:49 UTC (rev 112)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.6.5
+Created-By: 1.5.0_07-b03 (Sun Microsystems Inc.)
+Bundle-ManifestVersion: 2
+Bundle-Name: Techne Service Plugin
+Bundle-SymbolicName: org.digivitality.techne.service
+Bundle-Version: 1.0.0
+Bundle-Activator: org.digivitality.techne.service.Activator
+Import-Package: org.osgi.framework,org.apache.felix.shell,org.apache.c
+ ommons.logging
+
Added: prototype/org.digivitality.techne.service/src/org/digivitality/techne/service/Activator.java
===================================================================
--- prototype/org.digivitality.techne.service/src/org/digivitality/techne/service/Activator.java (rev 0)
+++ prototype/org.digivitality.techne.service/src/org/digivitality/techne/service/Activator.java 2007-03-07 08:53:49 UTC (rev 112)
@@ -0,0 +1,29 @@
+/**
+ *
+ */
+package org.digivitality.techne.service;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author Rick Litton
+ *
+ */
+public class Activator implements BundleActivator {
+
+ protected BundleContext bc;
+ protected final Log logger = LogFactory.getLog(getClass());
+
+ public void start(BundleContext context) throws Exception {
+ logger.info("Starting the service bundle...");
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ logger.info("Stopping the service bundle...");
+
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-07 08:45:26
|
Revision: 111
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=111&view=rev
Author: rickles
Date: 2007-03-07 00:45:26 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Checkin prototype
Added Paths:
-----------
prototype/org.digivitality.techne.core/
prototype/org.digivitality.techne.core/.classpath
prototype/org.digivitality.techne.core/.felix/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/embedded/org.mortbay.jetty-jdk1.2-4.2.25.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/embedded/servlet-4.0.6.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/revision.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.id
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.lastmodified
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.location
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.startlevel
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.state
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/bundle.jar
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/embedded/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/lib/
prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/revision.location
prototype/org.digivitality.techne.core/.project
prototype/org.digivitality.techne.core/bin/
prototype/org.digivitality.techne.core/bin/load/
prototype/org.digivitality.techne.core/bin/load/jl1.0.jar
prototype/org.digivitality.techne.core/bin/load/org.digivitality.techne.service-1.0.0.jar
prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.player-1.0.jar
prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.samplemusic-1.0.jar
prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.tui-1.0.jar
prototype/org.digivitality.techne.core/bin/techne.bat
prototype/org.digivitality.techne.core/bundle/
prototype/org.digivitality.techne.core/bundle/aQute.fileinstall-1.0.jar
prototype/org.digivitality.techne.core/bundle/javax.servlet-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/bundle/org.apache.felix.bundlerepository-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/bundle/org.apache.felix.dependencymanager-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/bundle/org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar
prototype/org.digivitality.techne.core/bundle/org.apache.felix.log-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/bundle/org.apache.felix.scr-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/bundle/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/bundle/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/classes/
prototype/org.digivitality.techne.core/classes/org/
prototype/org.digivitality.techne.core/classes/org/digivitality/
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/ContainerFactory.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/ContainerInstanceImpl.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/ContainerType.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/FunctionalArchiveImpl.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/Main.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/interfaces/
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/interfaces/ContainerInstance.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/interfaces/FunctionalArchive.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/util/
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/util/ConfigHandler.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/util/SimpleElement.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/util/bundle.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/util/container.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/core/util/containertype.class
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/launch/
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/launch/felix/
prototype/org.digivitality.techne.core/classes/org/digivitality/techne/launch/felix/FelixLauncher.class
prototype/org.digivitality.techne.core/conf/
prototype/org.digivitality.techne.core/conf/config.properties
prototype/org.digivitality.techne.core/conf/log4j.properties
prototype/org.digivitality.techne.core/conf/techne.xml
prototype/org.digivitality.techne.core/kmnet.log
prototype/org.digivitality.techne.core/lib/
prototype/org.digivitality.techne.core/lib/commons-logging-1.0.4.jar
prototype/org.digivitality.techne.core/lib/log4j-1.2.9.jar
prototype/org.digivitality.techne.core/lib/org.apache.felix.main-0.9.0-incubator-SNAPSHOT.jar
prototype/org.digivitality.techne.core/log/
prototype/org.digivitality.techne.core/src/
prototype/org.digivitality.techne.core/src/org/
prototype/org.digivitality.techne.core/src/org/digivitality/
prototype/org.digivitality.techne.core/src/org/digivitality/techne/
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerInstanceImpl.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerType.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/FunctionalArchiveImpl.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/Main.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/interfaces/
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/interfaces/ContainerInstance.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/interfaces/FunctionalArchive.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/util/
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/util/SimpleElement.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/util/bundle.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/util/container.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java
prototype/org.digivitality.techne.core/src/org/digivitality/techne/launch/
prototype/org.digivitality.techne.core/src/org/digivitality/techne/launch/felix/
prototype/org.digivitality.techne.core/src/org/digivitality/techne/launch/felix/FelixLauncher.java
Added: prototype/org.digivitality.techne.core/.classpath
===================================================================
--- prototype/org.digivitality.techne.core/.classpath (rev 0)
+++ prototype/org.digivitality.techne.core/.classpath 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.9.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.digivitality.techne.shell"/>
+ <classpathentry kind="lib" path="lib/org.apache.felix.main-0.9.0-incubator-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.component/classes"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216960906
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.osgi.compendium-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle1/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.osgi.compendium-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+10
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961484
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-service.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle10/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-service.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+11
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961562
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-service-manager.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle11/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-service-manager.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+12
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961640
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-ds.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle12/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-ds.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+2
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216960984
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.shell-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle2/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.shell-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+3
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961062
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.shell.tui-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle3/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.shell.tui-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+4
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961093
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.bundlerepository-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle4/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.bundlerepository-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+5
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961171
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/javax.servlet-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle5/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/javax.servlet-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+6
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961281
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/embedded/org.mortbay.jetty-jdk1.2-4.2.25.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/embedded/org.mortbay.jetty-jdk1.2-4.2.25.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/embedded/servlet-4.0.6.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/embedded/servlet-4.0.6.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle6/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+7
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961312
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-rmi.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle7/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-rmi.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+8
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961375
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-plugin.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle8/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-plugin.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.id
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.id (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.id 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+9
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.lastmodified
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.lastmodified (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.lastmodified 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1171216961453
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-shell.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.startlevel
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.startlevel (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.startlevel 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.state
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.state (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/bundle.state 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+active
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/bundle.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/bundle.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/revision.location
===================================================================
--- prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/revision.location (rev 0)
+++ prototype/org.digivitality.techne.core/.felix/kmnetadmin/bundle9/version0.0/revision.location 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1 @@
+file:../bundles/fwk-shell.jar
\ No newline at end of file
Added: prototype/org.digivitality.techne.core/.project
===================================================================
--- prototype/org.digivitality.techne.core/.project (rev 0)
+++ prototype/org.digivitality.techne.core/.project 2007-03-07 08:45:26 UTC (rev 111)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.digivitality.techne.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: prototype/org.digivitality.techne.core/bin/load/jl1.0.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/bin/load/jl1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/bin/load/org.digivitality.techne.service-1.0.0.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/bin/load/org.digivitality.techne.service-1.0.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.player-1.0.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.player-1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.samplemusic-1.0.jar
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.samplemusic-1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.core/bin/load/techne.samples.audio.tui-1.0.jar
===================================================================
(Binary files differ)
Property chang...
[truncated message content] |
|
From: <ri...@us...> - 2007-03-07 08:40:50
|
Revision: 110
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=110&view=rev
Author: rickles
Date: 2007-03-07 00:40:50 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Check in prototype code.
Added Paths:
-----------
prototype/org.digivitality.techne.component/
prototype/org.digivitality.techne.component/.classpath
prototype/org.digivitality.techne.component/.project
prototype/org.digivitality.techne.component/bin/
prototype/org.digivitality.techne.component/classes/
prototype/org.digivitality.techne.component/classes/org/
prototype/org.digivitality.techne.component/classes/org/digivitality/
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/ComponentManager.class
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/Feature.class
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/FeatureSet.class
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/Fragment.class
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/interfaces/
prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/interfaces/Component.class
prototype/org.digivitality.techne.component/src/
prototype/org.digivitality.techne.component/src/org/
prototype/org.digivitality.techne.component/src/org/digivitality/
prototype/org.digivitality.techne.component/src/org/digivitality/techne/
prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/
prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java
prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java
prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java
prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java
prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/interfaces/
prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/interfaces/Component.java
Added: prototype/org.digivitality.techne.component/.classpath
===================================================================
--- prototype/org.digivitality.techne.component/.classpath (rev 0)
+++ prototype/org.digivitality.techne.component/.classpath 2007-03-07 08:40:50 UTC (rev 110)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Added: prototype/org.digivitality.techne.component/.project
===================================================================
--- prototype/org.digivitality.techne.component/.project (rev 0)
+++ prototype/org.digivitality.techne.component/.project 2007-03-07 08:40:50 UTC (rev 110)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.digivitality.techne.component</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/ComponentManager.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/ComponentManager.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/Feature.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/Feature.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/FeatureSet.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/FeatureSet.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/Fragment.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/Fragment.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/interfaces/Component.class
===================================================================
(Binary files differ)
Property changes on: prototype/org.digivitality.techne.component/classes/org/digivitality/techne/component/interfaces/Component.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java
===================================================================
--- prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java (rev 0)
+++ prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java 2007-03-07 08:40:50 UTC (rev 110)
@@ -0,0 +1,127 @@
+/**
+ *
+ */
+package org.digivitality.techne.component;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.digivitality.techne.component.interfaces.Component;
+
+
+/**
+ * @author Rick Litton
+ *
+ */
+public class ComponentManager {
+
+ private List features = new ArrayList();
+ private List featureSets = new ArrayList();
+ private List fragments = new ArrayList();
+ private Map registry = new HashMap();
+
+ public ComponentManager() {
+ init();
+ }
+
+ public void init() {
+ try {
+ File file1 = new File("load/rssfeed.jar");
+ File file2 = new File("load/email.jar");
+ File file3 = new File("load/blog.jar");
+ File file4 = new File("load/filebrowser.jar");
+ fragments.add(new Fragment("RSS Feed", file1.toURL(), "1.0.0", "0"));
+ fragments.add(new Fragment("Email", file2.toURL(), "1.0.0", "1"));
+ fragments.add(new Fragment("MyBlog", file3.toURL(), "1.0.0", "2"));
+ fragments.add(new Fragment("FileBrowser", file4.toURL(), "1.0.0", "3"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public List getFragments() {
+ return fragments;
+ }
+
+ public List getComponents() {
+ List components = new ArrayList();
+ components.add(features);
+ components.add(featureSets);
+ components.add(fragments);
+ return components;
+ }
+
+ public Component getComponent(String id) {
+ Object[] objs = getComponents().toArray();
+ for (int i = 0; i < objs.length; i++) {
+ ArrayList list = (ArrayList)objs[i];
+ Object[] components = list.toArray();
+ for (int j = 0; j < components.length; j++){
+ if (components[j] instanceof org.digivitality.techne.component.Fragment)
+ return getFragment(id);
+ else if (components[j] instanceof org.digivitality.techne.component.Feature)
+ return getFeature(id);
+ }
+ }
+ return null;
+ }
+
+ public void addFragment(Fragment fragment) {
+ fragments.add(fragment);
+ }
+
+ public void addFeature(Feature feature) {
+ features.add(feature);
+ }
+
+ public List getFeatures() {
+ return features;
+ }
+
+ public Fragment addFragmentToFeature(String id, String feature) {
+ Fragment f = getFragment(id);
+ Feature ft = getFeature(feature);
+ ft.add(f);
+ return f;
+ }
+
+ public Fragment getFragment(String id) {
+ Iterator iter = fragments.iterator();
+ Fragment f = null;
+ while(iter.hasNext()) {
+ f = (Fragment)iter.next();
+ if (f.getId().equals(id))
+ return f;
+ }
+ return null;
+ }
+
+ public Feature getFeature(String name) {
+ name = name.trim();
+ Iterator iter = features.iterator();
+ Feature ft = null;
+ //System.out.println("Trying to get feature: '" + name + "'");
+ //System.out.println("Number of features: " + features.size());
+ while(iter.hasNext()) {
+ ft = (Feature)iter.next();
+ //System.out.println("Got this feature: '" + ft.getName() + "'");
+ if (ft.getName().equals(name))
+ return ft;
+ }
+ return null;
+ }
+
+ // this will be converted to DS
+ public void register(String key, Object value) {
+ registry.put(key, value);
+ }
+
+ public Object find(String key) {
+ return registry.get(key);
+ }
+ }
Added: prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java
===================================================================
--- prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java (rev 0)
+++ prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java 2007-03-07 08:40:50 UTC (rev 110)
@@ -0,0 +1,82 @@
+package org.digivitality.techne.component;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.digivitality.techne.component.interfaces.Component;
+
+public class Feature implements Component {
+ private URL location;
+ private String name;
+ private String id = "1.0";
+ private List fragments = new ArrayList();
+ private String state;
+ private String version;
+ private static String DEFAULT_STATE = "Uninstalled";
+ private String type = Component.FEATURE_TYPE;
+
+ public Feature(String name, String version, String id) {
+ setName(name);
+ setVersion(version);
+ setState(DEFAULT_STATE);
+ setId(id);
+ }
+
+ public void setLocation(URL url) {
+ this.location = url;
+ }
+
+ public URL getLocation() {
+ return location;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void add(Fragment fragment) {
+ fragments.add(fragment);
+ }
+
+ public List getFragments() {
+ return fragments;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ // TODO Auto-generated method stub
+
+ }
+}
Added: prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java
===================================================================
--- prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java (rev 0)
+++ prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java 2007-03-07 08:40:50 UTC (rev 110)
@@ -0,0 +1,90 @@
+package org.digivitality.techne.component;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.digivitality.techne.component.interfaces.Component;
+
+public class FeatureSet implements Component{
+
+ private URL location;
+ private String name;
+ private List list = new ArrayList();
+ private String type = Component.FEATURE_SET_TYPE;
+
+ FeatureSet() {}
+
+ FeatureSet(String name, URL url, List features) {
+ setName(name);
+ setLocation(url);
+ setFeatures(features);
+ }
+
+ public void setLocation(URL url) {
+ this.location = url;
+ }
+
+ public URL getLocation() {
+ return location;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void add(Feature feature) {
+ list.add(feature);
+ }
+
+ public List getFeatures() {
+ return list;
+ }
+
+ public void setFeatures(List features) {
+ this.list = features;
+ }
+
+ public String getId() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getState() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getVersion() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setId(String id) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setState(String state) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setVersion(String version) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ // TODO Auto-generated method stub
+
+ }
+}
Added: prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java
===================================================================
--- prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java (rev 0)
+++ prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java 2007-03-07 08:40:50 UTC (rev 110)
@@ -0,0 +1,85 @@
+/**
+ *
+ */
+package org.digivitality.techne.component;
+
+import java.net.URL;
+
+import org.digivitality.techne.component.interfaces.Component;
+
+/**
+ * @author Rick Litton
+ *
+ */
+public class Fragment implements Component {
+
+ private URL location;
+ private String name;
+ private String id;
+ private String state;
+ private String version;
+ private static String DEFAULT_STATE = "Uninstalled";
+ private String type = Component.FRAGMENT_TYPE;
+
+ public Fragment(String name) {
+ setName(name);
+ }
+
+ public Fragment(String name, URL url, String version, String id) {
+ setName(name);
+ setLocation(url);
+ setVersion(version);
+ setState(DEFAULT_STATE);
+ setId(id);
+ }
+
+ public void setLocation(URL url) {
+ this.location = url;
+ }
+
+ public URL getLocation() {
+ return location;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public String getType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setType(String type) {
+ // TODO Auto-generated method stub
+
+ }
+}
Added: prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/interfaces/Component.java
===================================================================
--- prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/interfaces/Component.java (rev 0)
+++ prototype/org.digivitality.techne.component/src/org/digivitality/techne/component/interfaces/Component.java 2007-03-07 08:40:50 UTC (rev 110)
@@ -0,0 +1,24 @@
+/**
+ *
+ */
+package org.digivitality.techne.component.interfaces;
+
+/**
+ * @author Rick Litton
+ *
+ */
+public interface Component {
+ public static String FRAGMENT_TYPE = "Fragment";
+ public static String FEATURE_TYPE = "Feature";
+ public static String FEATURE_SET_TYPE = "Feature Set";
+ public void setName(String name);
+ public String getName();
+ public void setId(String id);
+ public String getId();
+ public void setState(String state);
+ public String getState();
+ public void setVersion(String version);
+ public String getVersion();
+ public void setType(String type);
+ public String getType();
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-07 08:38:44
|
Revision: 109
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=109&view=rev
Author: rickles
Date: 2007-03-07 00:38:42 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Check in prototype
Added Paths:
-----------
prototype/Readme
Added: prototype/Readme
===================================================================
--- prototype/Readme (rev 0)
+++ prototype/Readme 2007-03-07 08:38:42 UTC (rev 109)
@@ -0,0 +1,60 @@
+Script for demo:
+
+1. Start with typed containers
+
+techne> set framework to Felix
+
+2. Show how I can switch from basic to web and back
+ to basic or default
+
+techne> show bundles (ps)
+techne> show container type
+techne> set container to web
+techne> ps (or ss in Equinox)
+techne> set container type to default
+techne> show bundles
+
+3. Show how to componentize
+
+techne> show components
+techne> create fragment 'Audio Player' using load/techne.samples.audio.jar
+techne> show components
+techne> create feature 'MashUp'
+techne> show components
+techne> add 1 to Mashup
+techne> show components
+techne> add 3 to Mashup
+techne> add 2 to Mashup
+techne> show components
+
+4. Create a FAR assembly
+
+techne> show container
+techne> create far 'My Audio'
+techne> add component 4 to 'My Audio'
+techne> show far 'My Audio'
+techne> show container
+techne> load 'My Audio' to instance 0
+techne> show container
+techne> switch to 0
+
+My Audio> show components
+My Audio> show instance
+My Audio> start
+My Audio> exit
+
+5. Add more fragments to FAR (emerging behavior)
+
+techne> create fragment 'Audio TUI' using load/techne.samples.audio,tui-1.0.jar
+techne> create fragment 'Audio Samples Music' using load/techne.samples.audio.samplemusic-1.0.jar
+techne> show components
+techne> add component 6 to 'My Audio'
+techne> add component 7 to 'My Audio'
+techne> switch to 0
+
+My Audio> show instance
+My Audio> exit
+
+techne> quit
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-07 08:13:09
|
Revision: 108
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=108&view=rev
Author: rickles
Date: 2007-03-07 00:13:09 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Clean up the prototype branch
Removed Paths:
-------------
prototype/techne.shell/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 21:28:47
|
Revision: 107
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=107&view=rev
Author: rickles
Date: 2007-03-03 13:28:47 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Added show components and show bundles commands
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
Modified: sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-03-03 20:29:20 UTC (rev 106)
+++ sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-03-03 21:28:47 UTC (rev 107)
@@ -3,37 +3,39 @@
*/
package org.digivitality.techne.shell;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Stack;
-import java.util.Vector;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.lang.reflect.Method;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.felix.framework.Felix;
-import org.apache.felix.shell.ShellService;
-import org.digivitality.techne.core.ContainerFactory;
-import org.digivitality.techne.core.util.ContainerState;
-import org.digivitality.techne.core.util.bundle;
-import org.digivitality.techne.core.util.containertype;
-import org.digivitality.techne.launch.felix.FelixLauncher;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkEvent;
import org.osgi.framework.FrameworkListener;
import org.osgi.framework.ServiceReference;
+import org.apache.felix.shell.ShellService;
+import org.apache.felix.framework.*;
+import org.digivitality.techne.component.ComponentManager;
+import org.digivitality.techne.component.Fragment;
+import org.digivitality.techne.core.ContainerFactory;
+import org.digivitality.techne.core.util.bundle;
+import org.digivitality.techne.core.util.containertype;
+import org.digivitality.techne.launch.felix.*;
+
/**
- * This is intended to demonstrate the concept of a container shell. To set the
- * framework, type 'set framework to Felix' on the command prompt.
+ * This is intended to demonstrate the concept of a container shell.
+ * To set the framework, type 'set framework to Felix' on the command prompt.
*
* @author Rick Liton
- *
+ *
*/
public class Shell implements FrameworkListener {
@@ -41,96 +43,90 @@
private String profile = "Peter";
private static String DEFAULT_CONTAINER_TYPE = "basic";
protected static final Log logger = LogFactory.getLog(Shell.class);
- private boolean stopping = false;
- private ContainerFactory containerFactory;
- private Thread techneThread;
- private Thread frameworkThread;
- protected FelixLauncher launcher;
- protected FelixFrameworkThread felix;
- private static Method executeCommand;
- private BundleContext context;
- protected Shell container;
- private ContainerState containerState;
+ private boolean stopping = false;
+ private ContainerFactory containerFactory;
+ private Thread techneThread;
+ private Thread frameworkThread;
+ protected FelixLauncher launcher;
+ protected FelixFrameworkThread felix;
+ private static Method executeCommand;
+ private BundleContext context;
+ protected Shell container;
+ private List containerInstances;
+ private List bundleList;
+ private String containerType = "basic";
+ private ComponentManager cm = new ComponentManager();
+
+ public Shell() {
- public Shell() {
-
- }
-
+ }
+
public void init() {
- container = this;
- System.out
- .println("\n===============================================================================\n");
- System.out
- .println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
- System.out
- .println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNNN NNNNN EEEEEEEEE");
- System.out
- .println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNNNNNNNNN EEEEE");
- System.out
- .println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNNN EEEEEEEE");
- System.out
- .println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNN EEEEEEEE");
- System.out
- .println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNN NNNNN EEEEE");
- System.out
- .println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
- System.out
- .println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE\n");
- System.out
- .println(" WELCOME TO THE TECHNE SHELL!");
- System.out
- .println("===============================================================================\n\n");
- System.out.println("Your default profile is " + profile + ".");
- System.out
- .println("Please select a framework by executing the `set framework to' command");
- System.out.println("or specify it in your techne.properties file.\n\n");
- execute();
+ container = this;
+ System.out.println("\n===============================================================================\n");
+ System.out.println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
+ System.out.println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNNN NNNNN EEEEEEEEE");
+ System.out.println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNNNNNNNNN EEEEE");
+ System.out.println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNNN EEEEEEEE");
+ System.out.println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNN EEEEEEEE");
+ System.out.println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNN NNNNN EEEEE");
+ System.out.println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
+ System.out.println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE\n");
+ System.out.println(" WELCOME TO THE TECHNE SHELL!");
+ System.out.println("===============================================================================\n\n");
+ System.out.println("Your default profile is " + profile + ".");
+ System.out.println("Please select a framework by executing the `set framework to' command");
+ System.out.println("or specify it in your techne.properties file.\n\n");
+ execute();
}
-
+
public void execute() {
final Runnable shell = new Runnable() {
+
+ public void run() {
+ String line = null;
+ BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
- public void run() {
- String line = null;
- BufferedReader in = new BufferedReader(new InputStreamReader(
- System.in));
+ while (!stopping)
+ {
+ System.out.print("techne> ");
- while (!stopping) {
- System.out.print("techne> ");
+ try {
+ line = in.readLine();
+ } catch (IOException ex) {
+ System.err.println("Could not read input, please try again.");
+ continue;
+ }
- try {
- line = in.readLine();
- } catch (IOException ex) {
- System.err
- .println("Could not read input, please try again.");
- continue;
- }
+ synchronized (Shell.this)
+ {
+ if (line == null)
+ {
+ continue;
+ }
- synchronized (Shell.this) {
- if (line == null) {
- continue;
- }
+ line = line.trim();
- line = line.trim();
+ if (line.length() == 0)
+ {
+ continue;
+ }
- if (line.length() == 0) {
- continue;
- }
-
- try {
- runCommand(line, System.out, System.err);
- } catch (Exception ex) {
- System.err.println("ERROR: " + ex);
- ex.printStackTrace();
- }
- }
- }
+ try {
+ runCommand(line, System.out, System.err);
+ } catch (Exception ex) {
+ System.err.println("ERROR: " + ex);
+ ex.printStackTrace();
+ }
+ }
+ }
}
-
+
/*
* Will use Command pattern later on.
*/
public void runCommand(String line, PrintStream out, PrintStream err) {
+
if (line.equals("set framework to Felix")) {
if (FRAMEWORK_SET) {
out.print("Framework has already been set to Felix\n");
@@ -139,27 +135,71 @@
frameworkThread = new Thread(felix);
frameworkThread.setPriority(1);
frameworkThread.start();
+
+ try {
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
- } else if (line.startsWith("set container type to")) {
- switchContainerTypeCommand(line, out, err);
- } else if (line.equals("show container type")) {
- System.out.println("container type is "
- + containerState.getType());
- } else if (line.equals("inspect container")) {
- System.out.println(containerState.toString());
- } else if (line.equals("exit") || line.equals("quit")) {
- stopping = true;
- try {
- Runtime.getRuntime().halt(0);
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- System.exit(0);
+ } else if (line.equals("set container type to web")) {
+ List list = containerFactory.getContainerTypes();
+ for (int i = 0; i < list.size(); i++) {
+ containertype ct = (containertype)list.get(i);
+ Map props = ct.getProperties();
+ String type = (String)props.get("value");
+ if (type.equals("web")) {
+ bundleList = ct.getBundles();
+ for (int j = 0; j < bundleList.size(); j++) {
+ bundle b = (bundle)bundleList.get(j);
+ Map p = b.getProperties();
+ execute("start " + p.get("url"), System.out, System.out);
+ }
+ }
}
+ containerType = "web";
+ } else if (line.equals("set container type to basic") || line.equals("set container type to default")) {
+ if (containerType.equals("web")) {
+ int id = 4;
+ for (int j = 0; j < bundleList.size(); j++) {
+ execute("uninstall " + id, System.out, System.out);
+ id++;
+ }
+ }
+ containerType = "basic";
+ } else if (line.equals("show container type")) {
+ System.out.println("Container type is " + containerType);
+ } else if (line.equals("show bundles")) {
+ execute("ps", System.out, System.out);
+ } else if (line.equals("show components")) {
+ Object[] objs = cm.getComponents().toArray();
+ List fragments = new ArrayList();
+ List features = new ArrayList();
+ System.out.println("START LEVEL 1");
+ System.out.println(" ID State Type Name");
+ for (int i = 0; i < objs.length; i++) {
+ ArrayList list = (ArrayList)objs[i];
+ Object[] components = list.toArray();
+ for (int j = 0; j < components.length; j++) {
+ if (components[j] instanceof org.digivitality.techne.component.Fragment)
+ fragments.add(components[j]);
+ else if (components[j] instanceof org.digivitality.techne.component.Feature)
+ features.add(components[j]);
+ }
+ displayComponents(fragments, features, null);
+ }
+ } else if (line.equals("exit") || line.equals("quit") ) {
+ stopping = true;
+ try {
+ Runtime.getRuntime().halt(0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ System.exit(0);
+ }
} else { // assume that it is a framework command
- // out.print("Unsupported command. Please try another
- // command.\n");
- execute(line, System.out, System.out);
+ //out.print("Unsupported command. Please try another command.\n");
+ execute(line, System.out, System.out);
}
}
};
@@ -167,179 +207,107 @@
techneThread.setPriority(5);
techneThread.start();
}
-
- private void switchContainerTypeCommand(String line, PrintStream out,
- PrintStream err) {
- String wantType = line.substring(line.lastIndexOf(' ')).trim()
- .toLowerCase();
- List newBundles = new Vector();
- Stack removeBundles = new Stack();
-
- // create "plan" (which to remove and which bundles to install
- if (wantType.equals(containerState.getType())) {
- out.println("container is already in type " + wantType);
- return;
- } else if (wantType.equalsIgnoreCase("basic")
- || wantType.equalsIgnoreCase("default")) {
- // just select "all" to be removed
- removeBundles = containerState.getInstalledBundles();
- } else {
- List list = containerFactory.getContainerTypes();
- removeBundles = containerState.getInstalledBundles();
- for (int i = 0; i < list.size(); i++) {
- containertype ct = (containertype) list.get(i);
- String type = (String) ct.getProperties().get("value");
- if (type.equals(wantType)) {
- // found wanted type
- for (Iterator itBundle = ct.getBundles().iterator(); itBundle
- .hasNext();) {
- bundle b = (bundle) itBundle.next();
- // check if already installed and running..
- // hook it
- String newBundleURL = (String) b.getProperties().get(
- "url");
- if (removeBundles.contains(newBundleURL)) {
- removeBundles.remove(newBundleURL);
- } else {
- newBundles.add(newBundleURL);
- }
- }
- }
- }
- }
- // execute "plan"
- // step 1: uninstall old
- while (removeBundles.size() > 0) {
- String bundleURL = (String) removeBundles.pop();
- containerState.remove(getBundleId(bundleURL), bundleURL);
- execute("uninstall " + getBundleId(bundleURL), out, err);
- }
- // step 2: install new
- for (Iterator itNew = newBundles.iterator(); itNew.hasNext();) {
- String bundleURL = (String) itNew.next();
- execute("start " + bundleURL, out, err);
- containerState.addInstalled(getBundleId(bundleURL), bundleURL);
- }
- // reset container type
- containerState.setType(wantType);
- }
-
- private long getBundleId(String newBundleURL) {
- long id = -1;
- try {
- Bundle[] bundles = (context.getBundles());
- for (int i = 0; i < bundles.length; i++) {
- Bundle bundle = bundles[i];
- if (bundle.getLocation().equals(newBundleURL)) {
- return bundle.getBundleId();
- }
- }
- } catch (Exception e) {
- // this may fail because of the dynamic nature
- }
- return id;
- }
-
+
protected void execute(String line, PrintStream in, PrintStream out) {
+ ShellService shell = null;
try {
- Object[] args = { line, in, out };
- ServiceReference ref = context
- .getServiceReference(ShellService.class.getName());
- if (ref != null) {
- Object o = context.getService(ref);
- System.out.println("o: " + o.getClass().getName() + " cl: "
- + o.getClass().getClassLoader());
- Class[] parameterTypes = { String.class, PrintStream.class,
- PrintStream.class };
- executeCommand = o.getClass().getDeclaredMethod(
- "executeCommand", parameterTypes);
- executeCommand.setAccessible(true);
- executeCommand.invoke(o, args);
- }
+ Object[] args = {line, in, out};
+ ServiceReference ref = context.getServiceReference(ShellService.class.getName());
+ if (ref!=null) {
+ Object o = context.getService(ref);
+ System.out.println("o: " + o.getClass().getName() + " cl: " + o.getClass().getClassLoader());
+ Class[] parameterTypes={String.class,PrintStream.class,PrintStream.class};
+ executeCommand = o.getClass().getDeclaredMethod("executeCommand", parameterTypes);
+ executeCommand.setAccessible(true);
+ executeCommand.invoke(o, args);
+ }
} catch (NullPointerException npe) {
- logger.warn("Could not invoke execute method: ", npe);
- System.out
- .println("Cannot execute framework command. Please select a framework.");
+ logger.warn("Could not invoke execute method: ", npe);
+ System.out.println("Cannot execute framework command. Please select a framework.");
} catch (Exception e) {
e.printStackTrace();
}
}
-
+
public static BundleContext getBundleContext(Bundle bundle) {
try {
- Class clazz = bundle.getClass();
- Method m = clazz.getDeclaredMethod("getContext", new Class[0]);
- m.setAccessible(true);
- return (BundleContext) m.invoke(bundle, new Object[0]);
- } catch (Exception e) {
- logger.error("getBundleContext failed", e);
- e.printStackTrace();
- return null;
- }
+ Class clazz = bundle.getClass();
+ Method m = clazz.getDeclaredMethod("getContext", new Class[0]);
+ m.setAccessible(true);
+ return (BundleContext) m.invoke(bundle, new Object[0]);
+ } catch (Exception e) {
+ logger.error("getBundleContext failed", e);
+ e.printStackTrace();
+ return null;
+ }
}
-
+
class FelixFrameworkThread implements Runnable {
-
+
Bundle[] bundles;
-
+
public void run() {
try {
- launcher = new FelixLauncher();
- launcher.launch();
- initializeContainer();
- System.out.print("techne> ");
+ launcher = new FelixLauncher();
+ launcher.launch();
+ setContainer();
+ System.out.print("techne> ");
} catch (Exception e) {
- e.printStackTrace();
+ e.printStackTrace();
}
}
/*
- * public Bundle[] getBundles() { return launcher.getBundles(); }
- *
- * public Object getService(Bundle b, ServiceReference ref) { return
- * launcher.getService(b, ref); }
- */
+ public Bundle[] getBundles() {
+ return launcher.getBundles();
+ }
+
+ public Object getService(Bundle b, ServiceReference ref) {
+ return launcher.getService(b, ref);
+ }
+ */
}
-
- protected void initializeContainer() {
+
+ protected void setContainer() {
try {
- Method m = Felix.class.getDeclaredMethod("getBundle",
- new Class[] { long.class });
- m.setAccessible(true);
- Bundle systemBundle = (Bundle) m.invoke(launcher.getFelix(),
- new Object[] { new Long(0) });
- System.out.println("systemBundle superclass: "
- + systemBundle.getClass().getSuperclass().getName());
- Method getContext = systemBundle.getClass().getSuperclass()
- .getDeclaredMethod("getContext", null);
- getContext.setAccessible(true);
- context = (BundleContext) getContext.invoke(systemBundle, null);
- System.out.println("BundleContext: " + context);
-
- loadContainer();
-
+ Method m = Felix.class.getDeclaredMethod("getBundle", new Class[] { long.class });
+ m.setAccessible(true);
+ Bundle systemBundle = (Bundle) m.invoke(launcher.getFelix(), new Object[] { new Long(0) });
+ System.out.println("systemBundle superclass: " + systemBundle.getClass().getSuperclass().getName());
+ Method getContext = systemBundle.getClass().getSuperclass().getDeclaredMethod("getContext", null);
+ getContext.setAccessible(true);
+ context = (BundleContext) getContext.invoke(systemBundle, null);
+ System.out.println("BundleContext: " + context);
+ containerFactory = ContainerFactory.getInstance();
+ containerFactory.init();
+ containerInstances = containerFactory.getContainerInstances();
+ System.out.println("Available container instances: " + containerInstances.size());
+ System.out.println("Container type: " + DEFAULT_CONTAINER_TYPE);
} catch (Exception e) {
e.printStackTrace();
}
}
-
- private void loadContainer() {
- containerFactory = ContainerFactory.getInstance();
-
- System.out.println("Available container instances: "
- + containerFactory.getContainerInstances().size());
- // load default bundles
- containerState = new ContainerState(DEFAULT_CONTAINER_TYPE);
- // load
-
- System.out.println("Container type: " + containerState.getType());
+
+ private void displayComponents(List fragments, List features, List featureSets) {
+ // display fragments, features, feature sets in this order
+ if (fragments != null) {
+ Iterator iter = fragments.iterator();
+ while (iter.hasNext()) {
+ Fragment f = (Fragment)iter.next();
+ String n = f.getName();
+ String s = f.getState();
+ String v = f.getVersion();
+ String id = f.getId();
+ System.out.println("[ " + id + "] " + "[" + s + "] [Fragment ] " + n + " (" + v + ")");
+ }
+ }
}
protected Shell getContainer() {
- System.out.println("Container: " + container);
+ System.out.println("Container: " + container);
return container;
}
-
+
/*
* need to create a Techne event dispatcher later
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 20:29:19
|
Revision: 106
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=106&view=rev
Author: rickles
Date: 2007-03-03 12:29:20 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
New classes.
Added Paths:
-----------
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java
Added: sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java (rev 0)
+++ sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/ComponentManager.java 2007-03-03 20:29:20 UTC (rev 106)
@@ -0,0 +1,51 @@
+/**
+ *
+ */
+package org.digivitality.techne.component;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Rick Litton
+ *
+ */
+public class ComponentManager {
+
+ private List features = new ArrayList();
+ private List featureSets = new ArrayList();
+ private List fragments = new ArrayList();
+
+ public ComponentManager() {
+ init();
+ }
+
+ public void init() {
+ try {
+ File file1 = new File("load/rssfeed.jar");
+ File file2 = new File("load/email.jar");
+ File file3 = new File("load/blog.jar");
+ File file4 = new File("load/filebrowser.jar");
+ fragments.add(new Fragment("RSS Feed", file1.toURL(), "1.0.0", "0"));
+ fragments.add(new Fragment("Email", file2.toURL(), "1.0.0", "1"));
+ fragments.add(new Fragment("MyBlog", file3.toURL(), "1.0.0", "2"));
+ fragments.add(new Fragment("FileBrowser", file4.toURL(), "1.0.0", "3"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public List getFragments() {
+ return fragments;
+ }
+
+ public List getComponents() {
+ List components = new ArrayList();
+ components.add(features);
+ components.add(featureSets);
+ components.add(fragments);
+ return components;
+ }
+ }
Added: sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java (rev 0)
+++ sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Feature.java 2007-03-03 20:29:20 UTC (rev 106)
@@ -0,0 +1,29 @@
+package org.digivitality.techne.component;
+
+import java.net.URL;
+
+public class Feature {
+ private URL location;
+ private String name;
+
+ Feature(String name, URL url) {
+ setName(name);
+ setLocation(url);
+ }
+
+ public void setLocation(URL url) {
+ this.location = url;
+ }
+
+ public URL getLocation() {
+ return location;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
Added: sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java (rev 0)
+++ sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/FeatureSet.java 2007-03-03 20:29:20 UTC (rev 106)
@@ -0,0 +1,48 @@
+package org.digivitality.techne.component;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+public class FeatureSet {
+
+ private URL location;
+ private String name;
+ private List list = new ArrayList();
+
+ FeatureSet() {}
+
+ FeatureSet(String name, URL url, List features) {
+ setName(name);
+ setLocation(url);
+ setFeatures(features);
+ }
+
+ public void setLocation(URL url) {
+ this.location = url;
+ }
+
+ public URL getLocation() {
+ return location;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void add(Feature feature) {
+ list.add(feature);
+ }
+
+ public List getFeatures() {
+ return list;
+ }
+
+ public void setFeatures(List features) {
+ this.list = features;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 20:28:22
|
Revision: 105
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=105&view=rev
Author: rickles
Date: 2007-03-03 12:28:18 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Completed first round.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java
Modified: sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java 2007-03-03 20:02:26 UTC (rev 104)
+++ sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java 2007-03-03 20:28:18 UTC (rev 105)
@@ -3,10 +3,70 @@
*/
package org.digivitality.techne.component;
+import java.net.URL;
+
/**
* @author Rick Litton
*
*/
public class Fragment {
+ private URL location;
+ private String name;
+ private String id;
+ private String state;
+ private String version;
+ private static String DEFAULT_STATE = "Uninstalled";
+
+ Fragment(String name) {
+ setName(name);
+ }
+
+ Fragment(String name, URL url, String version, String id) {
+ setName(name);
+ setLocation(url);
+ setVersion(version);
+ setState(DEFAULT_STATE);
+ setId(id);
+ }
+
+ public void setLocation(URL url) {
+ this.location = url;
+ }
+
+ public URL getLocation() {
+ return location;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getVersion() {
+ return version;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-03 20:02:31
|
Revision: 104
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=104&view=rev
Author: tonit
Date: 2007-03-03 12:02:26 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
implemented dynamic provisioning
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java
Added Paths:
-----------
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ContainerState.java
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java 2007-03-03 20:02:20 UTC (rev 103)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java 2007-03-03 20:02:26 UTC (rev 104)
@@ -2,13 +2,13 @@
import java.util.ArrayList;
import java.util.List;
-import org.xml.sax.*;
-import org.xml.sax.helpers.*;
-import javax.xml.parsers.*;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
import org.digivitality.techne.core.util.ConfigHandler;
import org.digivitality.techne.core.util.container;
-import org.digivitality.techne.core.util.containertype;
+import org.xml.sax.XMLReader;
public class ContainerFactory {
@@ -18,6 +18,7 @@
private List containerInstances = new ArrayList();
private List containerTypes = new ArrayList();
private static ContainerFactory instance;
+ private boolean init = false;
private ContainerFactory() {
@@ -33,6 +34,7 @@
synchronized (ContainerFactory.class) {
if (instance == null) {
instance = new ContainerFactory();
+ instance.init();
}
}
}
@@ -40,38 +42,41 @@
return instance;
}
- public void init() {
- if (quantity == 0) {
- quantity = DEFAULT_QUANTITY;
+ private void init() {
+ if (!init) {
+ if (quantity == 0) {
+ quantity = DEFAULT_QUANTITY;
+ }
+ for (int i = 0; i < quantity; i++) {
+ containerInstances.add(new ContainerIntanceImpl());
+ }
+
+ // parse the config file
+ loadContainerPolicies();
+ init = true;
}
- for (int i = 0; i < quantity; i++) {
- containerInstances.add(new ContainerIntanceImpl());
- }
-
- // parse the config file
- getContainerPolicies();
}
- public void getContainerPolicies() {
+ public void loadContainerPolicies() {
ConfigHandler ch = null;
try {
- SAXParserFactory factory = SAXParserFactory.newInstance( );
- SAXParser saxParser = factory.newSAXParser( );
- XMLReader parser = saxParser.getXMLReader( );
- ch = new ConfigHandler();
- parser.setContentHandler(ch);
- parser.parse( "../conf/techne.xml" );
-
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ SAXParser saxParser = factory.newSAXParser();
+ XMLReader parser = saxParser.getXMLReader();
+ ch = new ConfigHandler();
+ parser.setContentHandler(ch);
+ parser.parse("../conf/techne.xml");
+
} catch (Exception e) {
e.printStackTrace();
}
- container c = (container)ch.getModel();
- //containertype ct = (containertype)c.getContainerTypes().get(0);
- containerTypes = c.getContainerTypes();
- System.out.println("Available container types: " + containerTypes.size());
+ container c = (container) ch.getModel();
+ // containertype ct = (containertype)c.getContainerTypes().get(0);
+ containerTypes = c.getContainerTypes();
+ System.out.println("Available container types: " + containerTypes);
}
-
+
public void setQuantity(int parm) {
this.quantity = parm;
}
@@ -83,7 +88,7 @@
public List getContainerInstances() {
return containerInstances;
}
-
+
public List getContainerTypes() {
return containerTypes;
}
Added: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ContainerState.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ContainerState.java (rev 0)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ContainerState.java 2007-03-03 20:02:26 UTC (rev 104)
@@ -0,0 +1,55 @@
+package org.digivitality.techne.core.util;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Stack;
+
+/**
+ * Its basically the memory for the installed bundles at this moment.
+ *
+ * @author tmenzel
+ *
+ */
+public class ContainerState {
+ private String type;
+ private Set idset;
+ Stack bundles;
+
+ public ContainerState(String initialType) {
+ type = initialType;
+ idset = new HashSet();
+ bundles = new Stack();
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void addInstalled(long id, String newBundleURL) {
+ Long lo = new Long(id);
+ idset.add(lo);
+ bundles.add(newBundleURL);
+ }
+
+ public Set getIds() {
+ return idset;
+ }
+
+ public String toString() {
+ return "[type is " + type + "; installed bundles: " + idset + "]";
+ }
+
+ public Stack getInstalledBundles() {
+ return bundles;
+ }
+
+ public void remove(long bundleId, String bundleURL) {
+ idset.remove(new Long(bundleId));
+ bundles.remove(bundleURL);
+ }
+
+ public void setType(String wantType) {
+ type = wantType;
+
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-03 20:02:20
|
Revision: 103
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=103&view=rev
Author: tonit
Date: 2007-03-03 12:02:20 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
implemented dynamic provisioning
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
Property Changed:
----------------
sandbox/rickles/org.digivitality.techne.shell/
Property changes on: sandbox/rickles/org.digivitality.techne.shell
___________________________________________________________________
Name: svn:ignore
+ classes
Modified: sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-03-03 16:58:08 UTC (rev 102)
+++ sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-03-03 20:02:20 UTC (rev 103)
@@ -3,32 +3,37 @@
*/
package org.digivitality.techne.shell;
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.lang.reflect.Method;
+import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.lang.reflect.Method;
+import java.util.Stack;
+import java.util.Vector;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.felix.framework.Felix;
+import org.apache.felix.shell.ShellService;
+import org.digivitality.techne.core.ContainerFactory;
+import org.digivitality.techne.core.util.ContainerState;
+import org.digivitality.techne.core.util.bundle;
+import org.digivitality.techne.core.util.containertype;
+import org.digivitality.techne.launch.felix.FelixLauncher;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkEvent;
import org.osgi.framework.FrameworkListener;
import org.osgi.framework.ServiceReference;
-import org.apache.felix.shell.ShellService;
-import org.apache.felix.framework.*;
-import org.digivitality.techne.core.ContainerFactory;
-import org.digivitality.techne.core.util.bundle;
-import org.digivitality.techne.core.util.containertype;
-import org.digivitality.techne.launch.felix.*;
-
/**
- * This is intended to demonstrate the concept of a container shell.
- * To set the framework, type 'set framework to Felix' on the command prompt.
+ * This is intended to demonstrate the concept of a container shell. To set the
+ * framework, type 'set framework to Felix' on the command prompt.
*
* @author Rick Liton
- *
+ *
*/
public class Shell implements FrameworkListener {
@@ -36,89 +41,96 @@
private String profile = "Peter";
private static String DEFAULT_CONTAINER_TYPE = "basic";
protected static final Log logger = LogFactory.getLog(Shell.class);
- private boolean stopping = false;
- private ContainerFactory containerFactory;
- private Thread techneThread;
- private Thread frameworkThread;
- protected FelixLauncher launcher;
- protected FelixFrameworkThread felix;
- private static Method executeCommand;
- private BundleContext context;
- protected Shell container;
- private List containerInstances;
- private List bundleList;
- private String containerType;
-
- public Shell() {
+ private boolean stopping = false;
+ private ContainerFactory containerFactory;
+ private Thread techneThread;
+ private Thread frameworkThread;
+ protected FelixLauncher launcher;
+ protected FelixFrameworkThread felix;
+ private static Method executeCommand;
+ private BundleContext context;
+ protected Shell container;
+ private ContainerState containerState;
- }
-
+ public Shell() {
+
+ }
+
public void init() {
- container = this;
- System.out.println("\n===============================================================================\n");
- System.out.println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
- System.out.println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNNN NNNNN EEEEEEEEE");
- System.out.println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNNNNNNNNN EEEEE");
- System.out.println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNNN EEEEEEEE");
- System.out.println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNN EEEEEEEE");
- System.out.println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNN NNNNN EEEEE");
- System.out.println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
- System.out.println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE\n");
- System.out.println(" WELCOME TO THE TECHNE SHELL!");
- System.out.println("===============================================================================\n\n");
- System.out.println("Your default profile is " + profile + ".");
- System.out.println("Please select a framework by executing the `set framework to' command");
- System.out.println("or specify it in your techne.properties file.\n\n");
- execute();
+ container = this;
+ System.out
+ .println("\n===============================================================================\n");
+ System.out
+ .println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
+ System.out
+ .println(" TTTTTTTTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNNN NNNNN EEEEEEEEE");
+ System.out
+ .println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNNNNNNNNN EEEEE");
+ System.out
+ .println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNNN EEEEEEEE");
+ System.out
+ .println(" TTTTT EEEEEEEE CCCCC HHHHHHHHHHHH NNNNN NNNNN EEEEEEEE");
+ System.out
+ .println(" TTTTT EEEEE CCCCC HHHHH HHHHH NNNNN NNNNN EEEEE");
+ System.out
+ .println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE");
+ System.out
+ .println(" TTTTT EEEEEEEEE CCCCCCCCCC HHHHH HHHHH NNNNN NNNNN EEEEEEEEE\n");
+ System.out
+ .println(" WELCOME TO THE TECHNE SHELL!");
+ System.out
+ .println("===============================================================================\n\n");
+ System.out.println("Your default profile is " + profile + ".");
+ System.out
+ .println("Please select a framework by executing the `set framework to' command");
+ System.out.println("or specify it in your techne.properties file.\n\n");
+ execute();
}
-
+
public void execute() {
final Runnable shell = new Runnable() {
-
- public void run() {
- String line = null;
- BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
- while (!stopping)
- {
- System.out.print("techne> ");
+ public void run() {
+ String line = null;
+ BufferedReader in = new BufferedReader(new InputStreamReader(
+ System.in));
- try {
- line = in.readLine();
- } catch (IOException ex) {
- System.err.println("Could not read input, please try again.");
- continue;
- }
+ while (!stopping) {
+ System.out.print("techne> ");
- synchronized (Shell.this)
- {
- if (line == null)
- {
- continue;
- }
+ try {
+ line = in.readLine();
+ } catch (IOException ex) {
+ System.err
+ .println("Could not read input, please try again.");
+ continue;
+ }
- line = line.trim();
+ synchronized (Shell.this) {
+ if (line == null) {
+ continue;
+ }
- if (line.length() == 0)
- {
- continue;
- }
+ line = line.trim();
- try {
- runCommand(line, System.out, System.err);
- } catch (Exception ex) {
- System.err.println("ERROR: " + ex);
- ex.printStackTrace();
- }
- }
- }
+ if (line.length() == 0) {
+ continue;
+ }
+
+ try {
+ runCommand(line, System.out, System.err);
+ } catch (Exception ex) {
+ System.err.println("ERROR: " + ex);
+ ex.printStackTrace();
+ }
+ }
+ }
}
-
+
/*
* Will use Command pattern later on.
*/
public void runCommand(String line, PrintStream out, PrintStream err) {
-
if (line.equals("set framework to Felix")) {
if (FRAMEWORK_SET) {
out.print("Framework has already been set to Felix\n");
@@ -127,52 +139,27 @@
frameworkThread = new Thread(felix);
frameworkThread.setPriority(1);
frameworkThread.start();
-
- try {
-
- } catch (Exception e) {
- e.printStackTrace();
- }
}
- } else if (line.equals("set container type to web")) {
- List list = containerFactory.getContainerTypes();
- for (int i = 0; i < list.size(); i++) {
- containertype ct = (containertype)list.get(i);
- Map props = ct.getProperties();
- String type = (String)props.get("value");
- if (type.equals("web")) {
- bundleList = ct.getBundles();
- for (int j = 0; j < bundleList.size(); j++) {
- bundle b = (bundle)bundleList.get(j);
- Map p = b.getProperties();
- execute("start " + p.get("url"), System.out, System.out);
- }
- }
+ } else if (line.startsWith("set container type to")) {
+ switchContainerTypeCommand(line, out, err);
+ } else if (line.equals("show container type")) {
+ System.out.println("container type is "
+ + containerState.getType());
+ } else if (line.equals("inspect container")) {
+ System.out.println(containerState.toString());
+ } else if (line.equals("exit") || line.equals("quit")) {
+ stopping = true;
+ try {
+ Runtime.getRuntime().halt(0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ System.exit(0);
}
- containerType = "web";
- } else if (line.equals("set container type to basic") || line.equals("set container type to default")) {
- if (containerType.equals("web")) {
- int id = 4;
- for (int j = 0; j < bundleList.size(); j++) {
- execute("uninstall " + id, System.out, System.out);
- id++;
- }
- }
- containerType = "basic";
- } else if (line.equals("show container type")) {
- System.out.println("Container type is " + containerType);
- } else if (line.equals("exit") || line.equals("quit") ) {
- stopping = true;
- try {
- Runtime.getRuntime().halt(0);
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- System.exit(0);
- }
} else { // assume that it is a framework command
- //out.print("Unsupported command. Please try another command.\n");
- execute(line, System.out, System.out);
+ // out.print("Unsupported command. Please try another
+ // command.\n");
+ execute(line, System.out, System.out);
}
}
};
@@ -180,92 +167,179 @@
techneThread.setPriority(5);
techneThread.start();
}
-
+
+ private void switchContainerTypeCommand(String line, PrintStream out,
+ PrintStream err) {
+ String wantType = line.substring(line.lastIndexOf(' ')).trim()
+ .toLowerCase();
+ List newBundles = new Vector();
+ Stack removeBundles = new Stack();
+
+ // create "plan" (which to remove and which bundles to install
+ if (wantType.equals(containerState.getType())) {
+ out.println("container is already in type " + wantType);
+ return;
+ } else if (wantType.equalsIgnoreCase("basic")
+ || wantType.equalsIgnoreCase("default")) {
+ // just select "all" to be removed
+ removeBundles = containerState.getInstalledBundles();
+ } else {
+ List list = containerFactory.getContainerTypes();
+ removeBundles = containerState.getInstalledBundles();
+ for (int i = 0; i < list.size(); i++) {
+ containertype ct = (containertype) list.get(i);
+ String type = (String) ct.getProperties().get("value");
+ if (type.equals(wantType)) {
+ // found wanted type
+ for (Iterator itBundle = ct.getBundles().iterator(); itBundle
+ .hasNext();) {
+ bundle b = (bundle) itBundle.next();
+ // check if already installed and running..
+ // hook it
+ String newBundleURL = (String) b.getProperties().get(
+ "url");
+ if (removeBundles.contains(newBundleURL)) {
+ removeBundles.remove(newBundleURL);
+ } else {
+ newBundles.add(newBundleURL);
+ }
+ }
+ }
+ }
+ }
+ // execute "plan"
+ // step 1: uninstall old
+ while (removeBundles.size() > 0) {
+ String bundleURL = (String) removeBundles.pop();
+ containerState.remove(getBundleId(bundleURL), bundleURL);
+ execute("uninstall " + getBundleId(bundleURL), out, err);
+ }
+ // step 2: install new
+ for (Iterator itNew = newBundles.iterator(); itNew.hasNext();) {
+ String bundleURL = (String) itNew.next();
+ execute("start " + bundleURL, out, err);
+ containerState.addInstalled(getBundleId(bundleURL), bundleURL);
+ }
+ // reset container type
+ containerState.setType(wantType);
+ }
+
+ private long getBundleId(String newBundleURL) {
+ long id = -1;
+ try {
+ Bundle[] bundles = (context.getBundles());
+ for (int i = 0; i < bundles.length; i++) {
+ Bundle bundle = bundles[i];
+ if (bundle.getLocation().equals(newBundleURL)) {
+ return bundle.getBundleId();
+ }
+ }
+ } catch (Exception e) {
+ // this may fail because of the dynamic nature
+ }
+ return id;
+ }
+
protected void execute(String line, PrintStream in, PrintStream out) {
- ShellService shell = null;
try {
- Object[] args = {line, in, out};
- ServiceReference ref = context.getServiceReference(ShellService.class.getName());
- if (ref!=null) {
- Object o = context.getService(ref);
- System.out.println("o: " + o.getClass().getName() + " cl: " + o.getClass().getClassLoader());
- Class[] parameterTypes={String.class,PrintStream.class,PrintStream.class};
- executeCommand = o.getClass().getDeclaredMethod("executeCommand", parameterTypes);
- executeCommand.setAccessible(true);
- executeCommand.invoke(o, args);
- }
+ Object[] args = { line, in, out };
+ ServiceReference ref = context
+ .getServiceReference(ShellService.class.getName());
+ if (ref != null) {
+ Object o = context.getService(ref);
+ System.out.println("o: " + o.getClass().getName() + " cl: "
+ + o.getClass().getClassLoader());
+ Class[] parameterTypes = { String.class, PrintStream.class,
+ PrintStream.class };
+ executeCommand = o.getClass().getDeclaredMethod(
+ "executeCommand", parameterTypes);
+ executeCommand.setAccessible(true);
+ executeCommand.invoke(o, args);
+ }
} catch (NullPointerException npe) {
- logger.warn("Could not invoke execute method: ", npe);
- System.out.println("Cannot execute framework command. Please select a framework.");
+ logger.warn("Could not invoke execute method: ", npe);
+ System.out
+ .println("Cannot execute framework command. Please select a framework.");
} catch (Exception e) {
e.printStackTrace();
}
}
-
+
public static BundleContext getBundleContext(Bundle bundle) {
try {
- Class clazz = bundle.getClass();
- Method m = clazz.getDeclaredMethod("getContext", new Class[0]);
- m.setAccessible(true);
- return (BundleContext) m.invoke(bundle, new Object[0]);
- } catch (Exception e) {
- logger.error("getBundleContext failed", e);
- e.printStackTrace();
- return null;
- }
+ Class clazz = bundle.getClass();
+ Method m = clazz.getDeclaredMethod("getContext", new Class[0]);
+ m.setAccessible(true);
+ return (BundleContext) m.invoke(bundle, new Object[0]);
+ } catch (Exception e) {
+ logger.error("getBundleContext failed", e);
+ e.printStackTrace();
+ return null;
+ }
}
-
+
class FelixFrameworkThread implements Runnable {
-
+
Bundle[] bundles;
-
+
public void run() {
try {
- launcher = new FelixLauncher();
- launcher.launch();
- setContainer();
- System.out.print("techne> ");
+ launcher = new FelixLauncher();
+ launcher.launch();
+ initializeContainer();
+ System.out.print("techne> ");
} catch (Exception e) {
- e.printStackTrace();
+ e.printStackTrace();
}
}
/*
- public Bundle[] getBundles() {
- return launcher.getBundles();
- }
-
- public Object getService(Bundle b, ServiceReference ref) {
- return launcher.getService(b, ref);
- }
- */
+ * public Bundle[] getBundles() { return launcher.getBundles(); }
+ *
+ * public Object getService(Bundle b, ServiceReference ref) { return
+ * launcher.getService(b, ref); }
+ */
}
-
- protected void setContainer() {
+
+ protected void initializeContainer() {
try {
- Method m = Felix.class.getDeclaredMethod("getBundle", new Class[] { long.class });
- m.setAccessible(true);
- Bundle systemBundle = (Bundle) m.invoke(launcher.getFelix(), new Object[] { new Long(0) });
- System.out.println("systemBundle superclass: " + systemBundle.getClass().getSuperclass().getName());
- Method getContext = systemBundle.getClass().getSuperclass().getDeclaredMethod("getContext", null);
- getContext.setAccessible(true);
- context = (BundleContext) getContext.invoke(systemBundle, null);
- System.out.println("BundleContext: " + context);
- containerFactory = ContainerFactory.getInstance();
- containerFactory.init();
- containerInstances = containerFactory.getContainerInstances();
- System.out.println("Available container instances: " + containerInstances.size());
- System.out.println("Container type: " + DEFAULT_CONTAINER_TYPE);
+ Method m = Felix.class.getDeclaredMethod("getBundle",
+ new Class[] { long.class });
+ m.setAccessible(true);
+ Bundle systemBundle = (Bundle) m.invoke(launcher.getFelix(),
+ new Object[] { new Long(0) });
+ System.out.println("systemBundle superclass: "
+ + systemBundle.getClass().getSuperclass().getName());
+ Method getContext = systemBundle.getClass().getSuperclass()
+ .getDeclaredMethod("getContext", null);
+ getContext.setAccessible(true);
+ context = (BundleContext) getContext.invoke(systemBundle, null);
+ System.out.println("BundleContext: " + context);
+
+ loadContainer();
+
} catch (Exception e) {
e.printStackTrace();
}
}
+ private void loadContainer() {
+ containerFactory = ContainerFactory.getInstance();
+
+ System.out.println("Available container instances: "
+ + containerFactory.getContainerInstances().size());
+ // load default bundles
+ containerState = new ContainerState(DEFAULT_CONTAINER_TYPE);
+ // load
+
+ System.out.println("Container type: " + containerState.getType());
+ }
+
protected Shell getContainer() {
- System.out.println("Container: " + container);
+ System.out.println("Container: " + container);
return container;
}
-
+
/*
* need to create a Techne event dispatcher later
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 16:58:11
|
Revision: 102
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=102&view=rev
Author: rickles
Date: 2007-03-03 08:58:08 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Put back the getContainerTypes() method. Don't know how it was lost.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java 2007-03-03 10:59:54 UTC (rev 101)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java 2007-03-03 16:58:08 UTC (rev 102)
@@ -83,4 +83,8 @@
public List getContainerInstances() {
return containerInstances;
}
+
+ public List getContainerTypes() {
+ return containerTypes;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 10:59:53
|
Revision: 101
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=101&view=rev
Author: rickles
Date: 2007-03-03 02:59:54 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Created component project.
Added Paths:
-----------
sandbox/rickles/org.digivitality.techne.component/
sandbox/rickles/org.digivitality.techne.component/.classpath
sandbox/rickles/org.digivitality.techne.component/.project
sandbox/rickles/org.digivitality.techne.component/src/
sandbox/rickles/org.digivitality.techne.component/src/org/
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/
sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java
Added: sandbox/rickles/org.digivitality.techne.component/.classpath
===================================================================
--- sandbox/rickles/org.digivitality.techne.component/.classpath (rev 0)
+++ sandbox/rickles/org.digivitality.techne.component/.classpath 2007-03-03 10:59:54 UTC (rev 101)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Added: sandbox/rickles/org.digivitality.techne.component/.project
===================================================================
--- sandbox/rickles/org.digivitality.techne.component/.project (rev 0)
+++ sandbox/rickles/org.digivitality.techne.component/.project 2007-03-03 10:59:54 UTC (rev 101)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.digivitality.techne.component</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java (rev 0)
+++ sandbox/rickles/org.digivitality.techne.component/src/org/digivitality/techne/component/Fragment.java 2007-03-03 10:59:54 UTC (rev 101)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.digivitality.techne.component;
+
+/**
+ * @author Rick Litton
+ *
+ */
+public class Fragment {
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 10:52:20
|
Revision: 100
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=100&view=rev
Author: rickles
Date: 2007-03-03 02:52:20 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Activated several new commands for demo.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
Modified: sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-03-03 10:51:03 UTC (rev 99)
+++ sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-03-03 10:52:20 UTC (rev 100)
@@ -4,9 +4,8 @@
package org.digivitality.techne.shell;
import java.io.*;
-import java.text.*;
import java.util.List;
-import java.lang.reflect.Field;
+import java.util.Map;
import java.lang.reflect.Method;
import org.apache.commons.logging.Log;
@@ -16,12 +15,12 @@
import org.osgi.framework.FrameworkEvent;
import org.osgi.framework.FrameworkListener;
import org.osgi.framework.ServiceReference;
-//import org.ungoverned.osgi.service.shell.ShellService;
import org.apache.felix.shell.ShellService;
-import org.apache.felix.shell.impl.*;
import org.apache.felix.framework.*;
import org.digivitality.techne.core.ContainerFactory;
+import org.digivitality.techne.core.util.bundle;
+import org.digivitality.techne.core.util.containertype;
import org.digivitality.techne.launch.felix.*;
/**
@@ -43,11 +42,12 @@
private Thread frameworkThread;
protected FelixLauncher launcher;
protected FelixFrameworkThread felix;
- //static ShellService shellService;
private static Method executeCommand;
private BundleContext context;
protected Shell container;
private List containerInstances;
+ private List bundleList;
+ private String containerType;
public Shell() {
@@ -134,6 +134,33 @@
e.printStackTrace();
}
}
+ } else if (line.equals("set container type to web")) {
+ List list = containerFactory.getContainerTypes();
+ for (int i = 0; i < list.size(); i++) {
+ containertype ct = (containertype)list.get(i);
+ Map props = ct.getProperties();
+ String type = (String)props.get("value");
+ if (type.equals("web")) {
+ bundleList = ct.getBundles();
+ for (int j = 0; j < bundleList.size(); j++) {
+ bundle b = (bundle)bundleList.get(j);
+ Map p = b.getProperties();
+ execute("start " + p.get("url"), System.out, System.out);
+ }
+ }
+ }
+ containerType = "web";
+ } else if (line.equals("set container type to basic") || line.equals("set container type to default")) {
+ if (containerType.equals("web")) {
+ int id = 4;
+ for (int j = 0; j < bundleList.size(); j++) {
+ execute("uninstall " + id, System.out, System.out);
+ id++;
+ }
+ }
+ containerType = "basic";
+ } else if (line.equals("show container type")) {
+ System.out.println("Container type is " + containerType);
} else if (line.equals("exit") || line.equals("quit") ) {
stopping = true;
try {
@@ -155,28 +182,8 @@
}
protected void execute(String line, PrintStream in, PrintStream out) {
- //Bundle[] bundles = felix.getBundles();
ShellService shell = null;
- //System.out.println("Bundles found: " + bundles.length);
-
- /*
- for (int i = 0; i < bundles.length; i++) {
- System.out.println("Got this bundle: " + bundles[i].getLocation());
- if (bundles[i].getSymbolicName().startsWith("org.digivitality.techne.bundle")) {
- try {
- Class clazz = bundles[i].getClass();
- System.out.println("clazz: " + clazz.getName());
- Method m = clazz.getSuperclass().getDeclaredMethod("getShellService", new Class[0]);
- m.setAccessible(true);
- shell = (ShellService)m.invoke(bundles[i], new Object[0]);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- */
try {
- //Class clazz = Class.forName("org.apache.felix.shell.ShellService");
Object[] args = {line, in, out};
ServiceReference ref = context.getServiceReference(ShellService.class.getName());
if (ref!=null) {
@@ -186,8 +193,6 @@
executeCommand = o.getClass().getDeclaredMethod("executeCommand", parameterTypes);
executeCommand.setAccessible(true);
executeCommand.invoke(o, args);
- //Thread.currentThread().setContextClassLoader(clazz.getClassLoader());
- //shell = ShellService.class.cast(o);
}
} catch (NullPointerException npe) {
logger.warn("Could not invoke execute method: ", npe);
@@ -200,13 +205,8 @@
public static BundleContext getBundleContext(Bundle bundle) {
try {
Class clazz = bundle.getClass();
- /*
- System.out.println("clazz is " + clazz.getName()); Field field = clazz.getDeclaredField("bundleContext");
- field.setAccessible(true);
- return (BundleContext) field.get(bundle);
- */
Method m = clazz.getDeclaredMethod("getContext", new Class[0]);
- m.setAccessible(true);
+ m.setAccessible(true);
return (BundleContext) m.invoke(bundle, new Object[0]);
} catch (Exception e) {
logger.error("getBundleContext failed", e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 10:51:05
|
Revision: 99
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=99&view=rev
Author: rickles
Date: 2007-03-03 02:51:03 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Cleaned up code.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java 2007-03-03 10:50:07 UTC (rev 98)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java 2007-03-03 10:51:03 UTC (rev 99)
@@ -15,7 +15,7 @@
SimpleElement element = null;
String key = null;
try {
- element = (SimpleElement)Class.forName("org.digivitality.techne.core.util." + qname).newInstance();
+ element = (SimpleElement)Class.forName("org.digivitality.techne.core.util." + qname).newInstance();
} catch (Exception e) {/*No class for element*/}
for(int i=0; i<atts.getLength(); i++) {
@@ -32,9 +32,6 @@
if (!stack.empty()) {
try {
- //System.out.println("qname: " + qname);
- //System.out.println("stack object: " + stack.peek());
- //System.out.println("element: " + element);
setProperty(qname, stack.peek(), element );
} catch (Exception e) {
e.printStackTrace();
@@ -48,26 +45,13 @@
}
void setProperty(String name, Object target, Object value) throws SAXException {
- //System.out.println("property: " + name);
- //System.out.println("target: " + target.getClass());
- //System.out.println("value: " + value.getClass());
Method method = null;
try {
method = target.getClass().getMethod(
"add" + name, new Class[] { value.getClass() } );
- // invoke the method
- //System.out.println("Method to execute: " + method.toString());
method.invoke(target, new Object[]{value});
} catch (Exception e) {throw new SAXException(e.toString()); }
- /*
- if (method == null) {
- try {
- method = target.getClass().getMethod(
- "set" + name, new Class[] { value.getClass()} );
- method.invoke(target.getClass().newInstance(), new Object[]{value});
- } catch (Exception e) {throw new SAXException(e.toString()); }
- }
- */
+
if (method == null) {
throw new SAXException("No add method detected for " + target.getClass());
}
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java 2007-03-03 10:50:07 UTC (rev 98)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java 2007-03-03 10:51:03 UTC (rev 99)
@@ -6,7 +6,7 @@
public class containertype extends SimpleElement {
List bundles = new ArrayList();
- String value;
+ public String value;
String base;
public void addbundle(bundle b) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-03 10:50:07
|
Revision: 98
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=98&view=rev
Author: rickles
Date: 2007-03-03 02:50:07 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Changed order of bundles for web. Removed scr for time being.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/conf/techne.xml
Modified: sandbox/rickles/org.digivitality.techne.core/conf/techne.xml
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/conf/techne.xml 2007-03-03 01:13:06 UTC (rev 97)
+++ sandbox/rickles/org.digivitality.techne.core/conf/techne.xml 2007-03-03 10:50:07 UTC (rev 98)
@@ -1,27 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<container>
-<!--
-fattened up the basic profile, maybe we split this into two: "basic" and "osgicore"
--->
<containertype value="basic">
<bundle url="file:../bundle/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/org.apache.felix.bundlerepository-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/org.apache.felix.dependencymanager-0.9.0-incubator-SNAPSHOT.jar"/>
- <bundle url="file:../bundle/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar"/>
- <bundle url="file:../bundle/org.apache.felix.scr-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/org.apache.felix.log-0.9.0-incubator-SNAPSHOT.jar"/>
</containertype>
<containertype value="web" base="basic">
<bundle url="file:../bundle/javax.servlet-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar"/>
</containertype>
- <containertype value="audiosample" base="web">
- <!--
+ <containertype value="audiosample" base="web">
+ <!--
Note: we support naming conventions..
- -->
+ -->
<bundle url="file:../bundle/techne.sample.audio.*"/>
<bundle url="file:../bundle/techne.extender-1.0.jar"/>
</containertype>
-</container>
\ No newline at end of file
+</container>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-03 01:13:07
|
Revision: 97
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=97&view=rev
Author: tonit
Date: 2007-03-02 17:13:06 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
added to show my current direction. please elaborate on this
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/conf/techne.xml
Modified: sandbox/rickles/org.digivitality.techne.core/conf/techne.xml
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/conf/techne.xml 2007-03-03 01:09:46 UTC (rev 96)
+++ sandbox/rickles/org.digivitality.techne.core/conf/techne.xml 2007-03-03 01:13:06 UTC (rev 97)
@@ -1,14 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<container>
+<!--
+fattened up the basic profile, maybe we split this into two: "basic" and "osgicore"
+-->
<containertype value="basic">
<bundle url="file:../bundle/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/org.apache.felix.bundlerepository-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/org.apache.felix.dependencymanager-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/org.apache.felix.scr-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/org.apache.felix.log-0.9.0-incubator-SNAPSHOT.jar"/>
</containertype>
<containertype value="web" base="basic">
- <bundle url="file:../bundle/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/javax.servlet-0.9.0-incubator-SNAPSHOT.jar"/>
<bundle url="file:../bundle/org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar"/>
</containertype>
+
+ <containertype value="audiosample" base="web">
+ <!--
+ Note: we support naming conventions..
+ -->
+ <bundle url="file:../bundle/techne.sample.audio.*"/>
+ <bundle url="file:../bundle/techne.extender-1.0.jar"/>
+ </containertype>
</container>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-03 01:09:46
|
Revision: 96
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=96&view=rev
Author: tonit
Date: 2007-03-02 17:09:46 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
Property Changed:
----------------
sandbox/tonit/techne.extender/
Property changes on: sandbox/tonit/techne.extender
___________________________________________________________________
Name: svn:ignore
+ target
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-03 01:08:05
|
Revision: 95
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=95&view=rev
Author: tonit
Date: 2007-03-02 17:08:05 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
Initial import.
Added Paths:
-----------
sandbox/tonit/techne.extender/.classpath
sandbox/tonit/techne.extender/.project
sandbox/tonit/techne.extender/pom.xml
sandbox/tonit/techne.extender/src/
sandbox/tonit/techne.extender/src/main/
sandbox/tonit/techne.extender/src/main/java/
sandbox/tonit/techne.extender/src/main/java/techne/
sandbox/tonit/techne.extender/src/main/java/techne/extender/
sandbox/tonit/techne.extender/src/main/java/techne/extender/Activator.java
sandbox/tonit/techne.extender/src/main/java/techne/extender/Registry.java
sandbox/tonit/techne.extender/src/test/
Added: sandbox/tonit/techne.extender/.classpath
===================================================================
--- sandbox/tonit/techne.extender/.classpath (rev 0)
+++ sandbox/tonit/techne.extender/.classpath 2007-03-03 01:08:05 UTC (rev 95)
@@ -0,0 +1,10 @@
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/felix/javax.servlet/0.9.0-incubator-SNAPSHOT/javax.servlet-0.9.0-incubator-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.foundation/0.9.0-incubator-SNAPSHOT/org.osgi.foundation-0.9.0-incubator-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.core/0.9.0-incubator-SNAPSHOT/org.osgi.core-0.9.0-incubator-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.compendium/0.9.0-incubator-SNAPSHOT/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar"/>
+</classpath>
\ No newline at end of file
Added: sandbox/tonit/techne.extender/.project
===================================================================
--- sandbox/tonit/techne.extender/.project (rev 0)
+++ sandbox/tonit/techne.extender/.project 2007-03-03 01:08:05 UTC (rev 95)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>techne.extender</name>
+ <comment/>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Added: sandbox/tonit/techne.extender/pom.xml
===================================================================
--- sandbox/tonit/techne.extender/pom.xml (rev 0)
+++ sandbox/tonit/techne.extender/pom.xml 2007-03-03 01:08:05 UTC (rev 95)
@@ -0,0 +1,38 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>techne</groupId>
+ <artifactId>techne.extender</artifactId>
+ <packaging>bundle</packaging>
+ <version>1.0</version>
+ <name>techne.extender</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>0.9.0-incubator-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>0.9.0-incubator-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>techne.extender</Bundle-SymbolicName>
+ <Private-Package>techne.extender</Private-Package>
+ <Service-Component>techne.extender.Activator;log=org.osgi.service.log.LogService;http=org.osgi.service.http.HttpService</Service-Component>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: sandbox/tonit/techne.extender/src/main/java/techne/extender/Activator.java
===================================================================
--- sandbox/tonit/techne.extender/src/main/java/techne/extender/Activator.java (rev 0)
+++ sandbox/tonit/techne.extender/src/main/java/techne/extender/Activator.java 2007-03-03 01:08:05 UTC (rev 95)
@@ -0,0 +1,50 @@
+package techne.extender;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.log.LogService;
+
+public class Activator implements BundleListener {
+ BundleContext context;
+ Registry registry = new Registry();
+
+ protected void activate(ComponentContext cc) {
+ this.context = cc.getBundleContext();
+ context.addBundleListener(this);
+ Bundle bundles[] = context.getBundles();
+ for (int i = 0; i < bundles.length; i++) {
+ if ((bundles[i].getState() & (Bundle.STARTING | Bundle.ACTIVE)) != 0)
+ registry.register(bundles[i]);
+ }
+ }
+
+ protected void deactivate(ComponentContext context) throws Exception {
+ this.context.removeBundleListener(this);
+ registry.close();
+ }
+
+ public void bundleChanged(BundleEvent event) {
+ switch (event.getType()) {
+ case BundleEvent.STARTED:
+ registry.register(event.getBundle());
+ break;
+
+ case BundleEvent.STOPPED:
+ registry.unregister(event.getBundle());
+ break;
+ }
+ }
+
+ public void setHttp(HttpService http) {
+ registry.http = http;
+ }
+
+ public void setLog(LogService log) {
+ registry.log = log;
+ }
+
+}
\ No newline at end of file
Added: sandbox/tonit/techne.extender/src/main/java/techne/extender/Registry.java
===================================================================
--- sandbox/tonit/techne.extender/src/main/java/techne/extender/Registry.java (rev 0)
+++ sandbox/tonit/techne.extender/src/main/java/techne/extender/Registry.java 2007-03-03 01:08:05 UTC (rev 95)
@@ -0,0 +1,94 @@
+package techne.extender;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServlet;
+
+import org.osgi.framework.Bundle;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.log.LogService;
+
+public class Registry {
+ Set activated = new HashSet();
+ HttpService http;
+ LogService log;
+
+ public void register(Bundle bundle) {
+ synchronized (activated) {
+ if (activated.contains(bundle)) return;
+ }
+ Map clauses = getClauses(bundle);
+
+ for (Iterator e = clauses.entrySet().iterator(); e
+ .hasNext();) {
+ Map.Entry entry = (Map.Entry) e.next();
+ try {
+ String alias = (String) entry.getKey();
+ String className = (String) entry.getValue();
+ registerServlet(bundle, alias, className);
+ } catch (Throwable t) {
+ log.log(LogService.LOG_ERROR,
+ "[extender] Activating servlet from "
+ + bundle.getLocation(), t);
+ }
+ }
+ synchronized (activated) {
+ activated.add(bundle);
+ }
+ }
+
+ void registerServlet(Bundle bundle, String alias,
+ String className) throws Exception {
+ if (!alias.startsWith("/")) throw new IllegalArgumentException(
+ "Alias must start with / : " + alias);
+
+ Class clazz = bundle.loadClass(className);
+ if (clazz != null) {
+ HttpServlet servlet = (HttpServlet) clazz
+ .newInstance();
+ http.registerServlet(alias, servlet, null, null);
+ } else throw new IllegalArgumentException(
+ "Can not find class " + className);
+ }
+
+ public void unregister(Bundle bundle) {
+ synchronized (activated) {
+ if (!activated.contains(bundle)) return;
+ activated.remove(bundle);
+ }
+
+ Map clauses = getClauses(bundle);
+ for (Iterator i = clauses.keySet().iterator(); i
+ .hasNext();) {
+ String alias = (String) i.next();
+ http.unregister(alias);
+ }
+ }
+
+ Map getClauses(Bundle bundle) {
+ Map map = new HashMap();
+ String header = (String) bundle.getHeaders().get(
+ "ServletMap");
+ if (header != null) {
+ String clauses[] = header.split(",");
+ for (int i = 0; i < clauses.length; i++) {
+ String parts[] = clauses[i].trim().split(
+ "\\s*=\\s*");
+ if (parts.length == 2) map.put(parts[0], parts[1]);
+ }
+ }
+ return map;
+ }
+
+ void close() {
+ for (Iterator i = activated.iterator(); i.hasNext();) {
+ Bundle bundle = (Bundle) i.next();
+ unregister(bundle);
+ }
+ }
+ }
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-03 01:07:22
|
Revision: 94
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=94&view=rev
Author: tonit
Date: 2007-03-02 17:07:22 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
Initial import.
Added Paths:
-----------
sandbox/tonit/techne.extender/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-01 13:10:20
|
Revision: 93
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=93&view=rev
Author: tonit
Date: 2007-03-01 05:10:17 -0800 (Thu, 01 Mar 2007)
Log Message:
-----------
moved Main class to shell project to fix cyclic dep.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.shell/.classpath
Added Paths:
-----------
sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java
Modified: sandbox/rickles/org.digivitality.techne.shell/.classpath
===================================================================
--- sandbox/rickles/org.digivitality.techne.shell/.classpath 2007-03-01 13:08:20 UTC (rev 92)
+++ sandbox/rickles/org.digivitality.techne.shell/.classpath 2007-03-01 13:10:17 UTC (rev 93)
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/commons-logging-1.0.4.jar"/>
- <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/felix.jar"/>
- <classpathentry kind="lib" path="/org.digivitality.techne.core/bundle/org.apache.felix.shell-0.8.0-SNAPSHOT.jar"/>
- <classpathentry kind="lib" path="/org.digivitality.techne.core/classes"/>
- <classpathentry kind="output" path="classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/commons-logging-1.0.4.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/lib/felix.jar"/>
+ <classpathentry kind="lib" path="/org.digivitality.techne.core/bundle/org.apache.felix.shell-0.8.0-SNAPSHOT.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.digivitality.techne.core"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Copied: sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java (from rev 91, sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/Main.java)
===================================================================
--- sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java (rev 0)
+++ sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Main.java 2007-03-01 13:10:17 UTC (rev 93)
@@ -0,0 +1,36 @@
+/**
+ *
+ */
+package org.digivitality.techne.shell;
+
+import org.apache.log4j.*;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.impl.Log4JLogger;
+
+import org.digivitality.techne.shell.*;
+import org.digivitality.techne.launch.felix.*;
+
+/**
+ * Generic starter.
+ *
+ * @author Rick Litton
+ *
+ */
+public class Main {
+
+ static Log logger = LogFactory.getLog(Main.class);
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ (LogFactory.getLog(Main.class)).info("user.dir = " + System.getProperty("user.dir"));
+ Shell container = new Shell();
+ container.init();
+ /* test to run launcher directly */
+ //FelixLauncher l = new FelixLauncher();
+ //l.launch();
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2007-03-01 13:08:20
|
Revision: 92
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=92&view=rev
Author: tonit
Date: 2007-03-01 05:08:20 -0800 (Thu, 01 Mar 2007)
Log Message:
-----------
moved Main class to shell project to fix cyclic dep.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/.classpath
sandbox/rickles/org.digivitality.techne.core/bin/techne.bat
sandbox/rickles/org.digivitality.techne.core/bin/techne.sh
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/launch/felix/FelixLauncher.java
Removed Paths:
-------------
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/Main.java
Modified: sandbox/rickles/org.digivitality.techne.core/.classpath
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/.classpath 2007-03-01 08:01:39 UTC (rev 91)
+++ sandbox/rickles/org.digivitality.techne.core/.classpath 2007-03-01 13:08:20 UTC (rev 92)
@@ -4,7 +4,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.9.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.digivitality.techne.shell"/>
<classpathentry kind="lib" path="lib/felix.jar" sourcepath="C:/Workspace/Projects/JAVA/ApacheFelix"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Modified: sandbox/rickles/org.digivitality.techne.core/bin/techne.bat
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/bin/techne.bat 2007-03-01 08:01:39 UTC (rev 91)
+++ sandbox/rickles/org.digivitality.techne.core/bin/techne.bat 2007-03-01 13:08:20 UTC (rev 92)
@@ -8,4 +8,4 @@
set CLASSPATH=../classes;../../org.digivitality.techne.shell/classes;../lib/org.apache.felix.main-0.9.0-incubator-SNAPSHOT.jar;../lib/commons-logging-1.0.4.jar;../lib/log4j-1.2.9.jar;%BUNDLES%;%PROPDIR%;
set DEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y
-java -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -Dfelix.config.properties=file:../conf/config.properties org.digivitality.techne.core.Main
+java -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -Dfelix.config.properties=file:../conf/config.properties org.digivitality.techne.shell.Main
Modified: sandbox/rickles/org.digivitality.techne.core/bin/techne.sh
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/bin/techne.sh 2007-03-01 08:01:39 UTC (rev 91)
+++ sandbox/rickles/org.digivitality.techne.core/bin/techne.sh 2007-03-01 13:08:20 UTC (rev 92)
@@ -8,5 +8,5 @@
PROPDIR=../conf
BUNDLES=$BUNDLEDIR/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar
CLASSPATH=../classes:../../org.digivitality.techne.shell/classes:../lib/org.apache.felix.main-0.9.0-incubator-SNAPSHOT.jar:../lib/commons-logging-1.0.4.jar:../lib/log4j-1.2.9.jar:$BUNDLES:$PROPDIR
-echo Launch VM..
-java -cp $CLASSPATH -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -Dfelix.config.properties=file:../conf/config.properties org.digivitality.techne.core.Main
+echo Launch VM with CP: $CLASSPATH
+java -cp $CLASSPATH -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -Dfelix.config.properties=file:../conf/config.properties org.digivitality.techne.shell.Main
Deleted: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/Main.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/Main.java 2007-03-01 08:01:39 UTC (rev 91)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/Main.java 2007-03-01 13:08:20 UTC (rev 92)
@@ -1,36 +0,0 @@
-/**
- *
- */
-package org.digivitality.techne.core;
-
-import org.apache.log4j.*;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.impl.Log4JLogger;
-
-import org.digivitality.techne.shell.*;
-import org.digivitality.techne.launch.felix.*;
-
-/**
- * Generic starter.
- *
- * @author Rick Litton
- *
- */
-public class Main {
-
- static Log logger = LogFactory.getLog(Main.class);
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- (LogFactory.getLog(Main.class)).info("user.dir = " + System.getProperty("user.dir"));
- Shell container = new Shell();
- container.init();
- /* test to run launcher directly */
- //FelixLauncher l = new FelixLauncher();
- //l.launch();
- }
-
-}
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/launch/felix/FelixLauncher.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/launch/felix/FelixLauncher.java 2007-03-01 08:01:39 UTC (rev 91)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/launch/felix/FelixLauncher.java 2007-03-01 13:08:20 UTC (rev 92)
@@ -1,16 +1,13 @@
package org.digivitality.techne.launch.felix;
-import java.io.*;
-import java.util.*;
+import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
import org.apache.felix.framework.Felix;
+import org.apache.felix.framework.util.MutablePropertyResolverImpl;
+import org.apache.felix.framework.util.StringMap;
import org.apache.felix.main.Main;
-import org.apache.felix.framework.util.*;
-import org.digivitality.techne.shell.Shell;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-01 08:01:41
|
Revision: 91
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=91&view=rev
Author: rickles
Date: 2007-03-01 00:01:39 -0800 (Thu, 01 Mar 2007)
Log Message:
-----------
Stripped down to basic felix bundles.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/conf/config.properties
Modified: sandbox/rickles/org.digivitality.techne.core/conf/config.properties
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/conf/config.properties 2007-03-01 08:00:22 UTC (rev 90)
+++ sandbox/rickles/org.digivitality.techne.core/conf/config.properties 2007-03-01 08:01:39 UTC (rev 91)
@@ -14,9 +14,6 @@
felix.auto.start.1= \
file:../bundle/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar \
file:../bundle/org.apache.felix.bundlerepository-0.9.0-incubator-SNAPSHOT.jar \
- file:../bundle/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar \
- file:../bundle/javax.servlet-0.9.0-incubator-SNAPSHOT.jar \
- file:../bundle/org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar \
file:../bundle/org.apache.felix.dependencymanager-0.9.0-incubator-SNAPSHOT.jar
felix.log.level=1
felix.startlevel.framework=1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-01 08:00:28
|
Revision: 90
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=90&view=rev
Author: rickles
Date: 2007-03-01 00:00:22 -0800 (Thu, 01 Mar 2007)
Log Message:
-----------
Added techne.xml config file.
Added Paths:
-----------
sandbox/rickles/org.digivitality.techne.core/conf/techne.xml
Added: sandbox/rickles/org.digivitality.techne.core/conf/techne.xml
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/conf/techne.xml (rev 0)
+++ sandbox/rickles/org.digivitality.techne.core/conf/techne.xml 2007-03-01 08:00:22 UTC (rev 90)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<container>
+ <containertype value="basic">
+ <bundle url="file:../bundle/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/org.apache.felix.bundlerepository-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/org.apache.felix.dependencymanager-0.9.0-incubator-SNAPSHOT.jar"/>
+ </containertype>
+
+ <containertype value="web" base="basic">
+ <bundle url="file:../bundle/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/javax.servlet-0.9.0-incubator-SNAPSHOT.jar"/>
+ <bundle url="file:../bundle/org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar"/>
+ </containertype>
+</container>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ri...@us...> - 2007-03-01 07:57:02
|
Revision: 89
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=89&view=rev
Author: rickles
Date: 2007-02-28 23:57:02 -0800 (Wed, 28 Feb 2007)
Log Message:
-----------
Implement techne.xml config file.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java 2007-03-01 07:46:51 UTC (rev 88)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/ContainerFactory.java 2007-03-01 07:57:02 UTC (rev 89)
@@ -2,13 +2,21 @@
import java.util.ArrayList;
import java.util.List;
+import org.xml.sax.*;
+import org.xml.sax.helpers.*;
+import javax.xml.parsers.*;
+import org.digivitality.techne.core.util.ConfigHandler;
+import org.digivitality.techne.core.util.container;
+import org.digivitality.techne.core.util.containertype;
+
public class ContainerFactory {
// this will be replaced by techne.properties
private static int DEFAULT_QUANTITY = 3;
private int quantity;
private List containerInstances = new ArrayList();
+ private List containerTypes = new ArrayList();
private static ContainerFactory instance;
private ContainerFactory() {
@@ -39,8 +47,31 @@
for (int i = 0; i < quantity; i++) {
containerInstances.add(new ContainerIntanceImpl());
}
+
+ // parse the config file
+ getContainerPolicies();
}
+ public void getContainerPolicies() {
+ ConfigHandler ch = null;
+ try {
+ SAXParserFactory factory = SAXParserFactory.newInstance( );
+ SAXParser saxParser = factory.newSAXParser( );
+ XMLReader parser = saxParser.getXMLReader( );
+ ch = new ConfigHandler();
+ parser.setContentHandler(ch);
+ parser.parse( "../conf/techne.xml" );
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ container c = (container)ch.getModel();
+ //containertype ct = (containertype)c.getContainerTypes().get(0);
+ containerTypes = c.getContainerTypes();
+ System.out.println("Available container types: " + containerTypes.size());
+ }
+
public void setQuantity(int parm) {
this.quantity = parm;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|