Author: gnodet
Date: Mon Oct 8 23:38:54 2007
New Revision: 583058
URL: http://svn.apache.org/viewvc?rev=583058&view=rev
Log:
Update to latest gshell and try remote support
Added:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandListener.java
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandRegistry.java
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/gshell/commands.xml
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-osgi-commands/pom.xml
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/pom.xml
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/Activator.java
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/GShell.java
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandDiscoverer.java
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/components.xml
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/plexus.xml
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-osgi-commands/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-osgi-commands/pom.xml?rev=583058&r1=583057&r2=583058&view=diff
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-osgi-commands/pom.xml
(original)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-osgi-commands/pom.xml
Mon Oct 8 23:38:54 2007
@@ -68,7 +68,7 @@
<executions>
<execution>
<goals>
- <goal>commands-descriptor</goal>
+ <goal>descriptor</goal>
</goals>
</execution>
</executions>
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/pom.xml?rev=583058&r1=583057&r2=583058&view=diff
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/pom.xml
(original)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/pom.xml
Mon Oct 8 23:38:54 2007
@@ -54,24 +54,11 @@
sun.*;resolution:=optional,
*
</gshell.osgi.import>
- <!--
- <gshell.osgi.private.pkg>
- com.thoughtworks.xstream*,
- jline*,
- org.apache.commons.jexl*,
- org.codehaus.classworlds*,
- org.codehaus.plexus*,
- org.xmlpull.*,
- META-INF*
- </gshell.osgi.private.pkg>
- <gshell.osgi.export.pkg>
- org.apache.geronimo.gshell*
- </gshell.osgi.export.pkg>
- -->
- <gshell.osgi.private.pkg>
+ <gshell.osgi.private.pkg>
com.thoughtworks.xstream*,
jline*,
org.apache.commons.jexl*,
+ org.apache.mina*,
org.codehaus.classworlds*,
org.xmlpull.*,
META-INF*
@@ -90,59 +77,44 @@
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
- <!--
- <dependency>
- <groupId>org.apache.geronimo.gshell</groupId>
- <artifactId>gshell-core</artifactId>
- <version>${version}</version>
- </dependency>
<dependency>
- <groupId>org.apache.geronimo.gshell</groupId>
- <artifactId>gshell-command-api</artifactId>
- <version>${version}</version>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <version>1.0.0</version>
+ <scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.gshell.support</groupId>
- <artifactId>gshell-common</artifactId>
- <version>${version}</version>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-classworlds</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.gshell.support</groupId>
- <artifactId>gshell-ansi</artifactId>
+ <dependency>
+ <groupId>org.apache.geronimo.gshell</groupId>
+ <artifactId>gshell-embeddable</artifactId>
<version>${version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.gshell.support</groupId>
- <artifactId>gshell-i18n</artifactId>
+ <dependency>
+ <groupId>org.apache.geronimo.gshell.remote</groupId>
+ <artifactId>gshell-remote-server</artifactId>
<version>${version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.gshell.support</groupId>
- <artifactId>gshell-clp</artifactId>
+ <dependency>
+ <groupId>org.apache.geronimo.gshell.remote</groupId>
+ <artifactId>gshell-remote-common</artifactId>
<version>${version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.geronimo.gshell</groupId>
- <artifactId>gshell-parser</artifactId>
+ <artifactId>gshell-whisper</artifactId>
<version>${version}</version>
</dependency>
- -->
<dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-classworlds</artifactId>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-core</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.gshell</groupId>
- <artifactId>gshell-embeddable</artifactId>
- <version>${version}</version>
- </dependency>
- <!--
- <dependency>
- <groupId>org.apache.geronimo.gshell.osgi</groupId>
- <artifactId>gshell-osgi-commands</artifactId>
- <version>${version}</version>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-filter-ssl</artifactId>
</dependency>
- -->
</dependencies>
<build>
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/Activator.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/Activator.java?rev=583058&r1=583057&r2=583058&view=diff
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/Activator.java
(original)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/Activator.java
Mon Oct 8 23:38:54 2007
@@ -1,10 +1,16 @@
package org.apache.geronimo.gshell.osgi;
+import java.net.URI;
+import java.util.HashMap;
+
+import javax.security.auth.login.AppConfigurationEntry;
+import javax.security.auth.login.Configuration;
+
import org.apache.geronimo.gshell.command.IO;
+import org.apache.geronimo.gshell.remote.server.auth.BogusLoginModule;
import org.codehaus.plexus.classworlds.ClassWorld;
-import org.osgi.framework.*;
-
-import java.util.concurrent.CountDownLatch;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator, Runnable {
@@ -12,8 +18,23 @@
private GShell shell;
private Thread thread;
private ClassLoader classLoader;
+ private OsgiCommandListener listener;
+ private OsgiCommandDiscoverer discoverer;
public void start(BundleContext bundleContext) throws Exception {
+
+ Configuration.setConfiguration(new Configuration() {
+ public AppConfigurationEntry[] getAppConfigurationEntry(String
name) {
+ return new AppConfigurationEntry[] {
+ new AppConfigurationEntry(BogusLoginModule.class.getName(),
+
AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
+ new HashMap())
+ };
+ }
+ public void refresh() {
+ }
+ });
+
context = bundleContext;
classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(
context.getBundle(),
Activator.class.getClassLoader());
@@ -23,10 +44,13 @@
shell = new GShell(cw, io);
thread = new Thread(this);
thread.start();
- new OsgiCommandDiscoverer(bundleContext, shell.getCommandRegistry());
+ listener = new OsgiCommandListener(bundleContext,
shell.getCommandRegistry());
+ listener.open();;
+ discoverer = new OsgiCommandDiscoverer(bundleContext);
}
public void stop(BundleContext bundleContext) throws Exception {
+ listener.close();;
thread.interrupt();
thread.join();
}
@@ -34,8 +58,9 @@
public void run() {
try {
// Wait a bit to make sure everything is initialized
- Thread.sleep(100);
+ Thread.sleep(500);
Thread.currentThread().setContextClassLoader(classLoader);
+ shell.getRshServer().bind(new URI("tcp://0.0.0.0:8000"));
shell.run();
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use File
| Settings | File Templates.
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/GShell.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/GShell.java?rev=583058&r1=583057&r2=583058&view=diff
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/GShell.java
(original)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/GShell.java
Mon Oct 8 23:38:54 2007
@@ -26,6 +26,7 @@
import org.apache.geronimo.gshell.lookup.EnvironmentLookup;
import org.apache.geronimo.gshell.lookup.IOLookup;
import org.apache.geronimo.gshell.registry.CommandRegistry;
+import org.apache.geronimo.gshell.remote.server.RshServer;
import org.apache.geronimo.gshell.shell.Environment;
import org.apache.geronimo.gshell.shell.InteractiveShell;
import org.apache.geronimo.gshell.shell.ShellInfo;
@@ -61,6 +62,8 @@
private final CommandRegistry registry;
+ private final RshServer rshServer;
+
public GShell(final IO io) throws Exception {
this(new ClassWorld("gshell",
Thread.currentThread().getContextClassLoader()), io);
}
@@ -92,6 +95,9 @@
// Lookup the registry
registry = (CommandRegistry)
container.lookup(CommandRegistry.class);
+ // Lookup the rsh server
+ rshServer = (RshServer) container.lookup(RshServer.class);
+
// We first need to stuff in the IO context for the new shell
instance
IOLookup.set(container, io);
// And then lets stuff in the environment too
@@ -117,6 +123,10 @@
public CommandRegistry getCommandRegistry() {
return registry;
+ }
+
+ public RshServer getRshServer() {
+ return rshServer;
}
public Object execute(final String line) throws Exception {
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandDiscoverer.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandDiscoverer.java?rev=583058&r1=583057&r2=583058&view=diff
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandDiscoverer.java
(original)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandDiscoverer.java
Mon Oct 8 23:38:54 2007
@@ -16,24 +16,24 @@
*/
package org.apache.geronimo.gshell.osgi;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+
import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.descriptor.CommandDescriptor;
-import org.apache.geronimo.gshell.command.descriptor.CommandSetDescriptor;
-import org.apache.geronimo.gshell.plugin.CommandSetDescriptorBuilder;
-import org.apache.geronimo.gshell.registry.CommandRegistry;
+import org.apache.geronimo.gshell.descriptor.CommandDescriptor;
+import org.apache.geronimo.gshell.descriptor.CommandSetDescriptor;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.framework.ServiceRegistration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
/**
* Created by IntelliJ IDEA.
* User: gnodet
@@ -47,12 +47,14 @@
private final BundleContext bundleContext;
private final Map<String, OsgiCommand> commands;
- private final CommandRegistry registry;
private class BundleListener implements SynchronousBundleListener {
public void bundleChanged(BundleEvent event) {
try {
Bundle bundle = event.getBundle();
+ if (bundle == bundleContext.getBundle()) {
+ return;
+ }
if (event.getType() == BundleEvent.STARTED) {
if (LOG.isDebugEnabled()) {
LOG.debug("Bundle resolved: " +
bundle.getSymbolicName());
@@ -76,6 +78,7 @@
String implementation;
String description;
Class type;
+ ServiceRegistration reg;
public String getId() {
return id;
@@ -99,11 +102,10 @@
}
}
- public OsgiCommandDiscoverer(BundleContext context, CommandRegistry
registry) {
+ public OsgiCommandDiscoverer(BundleContext context) {
LOG.debug("Initializing OsgiCommandDiscoverer");
this.commands = new ConcurrentHashMap<String, OsgiCommand>();
this.bundleContext = context;
- this.registry = registry;
bundleContext.addBundleListener(new BundleListener());
Bundle[] previousBundles = bundleContext.getBundles();
for (int i = 0; i < previousBundles.length; i++) {
@@ -121,8 +123,8 @@
LOG.debug("Found entry: " + url + " in bundle " +
bundle.getSymbolicName());
}
try {
- CommandSetDescriptor set = new
CommandSetDescriptorBuilder().build(new InputStreamReader(url.openStream()),
url.toString());
- for (CommandDescriptor desc : set.getCommandDescriptors()) {
+ CommandSetDescriptor set = CommandSetDescriptor.fromXML(new
InputStreamReader(url.openStream()));
+ for (CommandDescriptor desc : set.getCommands()) {
OsgiCommand cmd = new OsgiCommand();
cmd.bundle = bundle;
cmd.id = desc.getId();
@@ -132,7 +134,7 @@
if (LOG.isDebugEnabled()) {
LOG.debug("Adding command: " + cmd.id + " (" +
cmd.implementation + ")");
}
- registry.register(cmd);
+ cmd.reg =
bundleContext.registerService(Command.class.getName(), cmd, new Properties());
}
}
catch (Exception e) {
@@ -147,8 +149,8 @@
if (LOG.isDebugEnabled()) {
LOG.debug("Removing entry: " + entry.id + " in bundle " +
bundle.getSymbolicName());
}
- Command cmd = commands.remove(entry.id);
- registry.unregister(cmd);
+ OsgiCommand cmd = commands.remove(entry.id);
+ cmd.reg.unregister();
}
}
}
Added:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandListener.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandListener.java?rev=583058&view=auto
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandListener.java
(added)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandListener.java
Mon Oct 8 23:38:54 2007
@@ -0,0 +1,54 @@
+package org.apache.geronimo.gshell.osgi;
+
+import org.apache.geronimo.gshell.command.Command;
+import org.apache.geronimo.gshell.registry.CommandRegistry;
+import org.apache.geronimo.gshell.registry.NotRegisteredException;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Oct 8, 2007
+ * Time: 8:57:03 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class OsgiCommandListener extends ServiceTracker {
+
+ private static final transient Logger LOG =
LoggerFactory.getLogger(OsgiCommandListener.class);
+
+ private final CommandRegistry registry;
+
+ public OsgiCommandListener(BundleContext context, CommandRegistry
registry) {
+ super(context, Command.class.getName(), null);
+ LOG.debug("Initializing OsgiCommandListener");
+ this.registry = registry;
+ }
+
+ public Object addingService(ServiceReference serviceReference) {
+ Command cmd = (Command) super.addingService(serviceReference);
+ try {
+ registry.register(cmd);
+ } catch (Exception e) {
+ LOG.debug("Error registering command", e);
+ }
+ return cmd;
+ }
+
+ public void modifiedService(ServiceReference serviceReference, Object o) {
+ }
+
+ public void removedService(ServiceReference serviceReference, Object o) {
+ Command cmd = (Command) o;
+ try {
+ registry.unregister(cmd);
+ } catch (Exception e) {
+ LOG.debug("Error unregistering command", e);
+ }
+ }
+
+}
Added:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandRegistry.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandRegistry.java?rev=583058&view=auto
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandRegistry.java
(added)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/java/org/apache/geronimo/gshell/osgi/OsgiCommandRegistry.java
Mon Oct 8 23:38:54 2007
@@ -0,0 +1,37 @@
+package org.apache.geronimo.gshell.osgi;
+
+import java.util.Collection;
+
+import org.apache.geronimo.gshell.registry.CommandRegistry;
+import org.apache.geronimo.gshell.registry.DefaultCommandRegistry;
+import org.apache.geronimo.gshell.registry.DuplicateRegistrationException;
+import org.apache.geronimo.gshell.registry.NotRegisteredException;
+import org.apache.geronimo.gshell.command.Command;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Oct 8, 2007
+ * Time: 9:39:10 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class OsgiCommandRegistry implements CommandRegistry {
+
+ private static CommandRegistry registry = new DefaultCommandRegistry();
+
+ public void register(Command command) throws
DuplicateRegistrationException {
+ registry.register(command);
+ }
+
+ public void unregister(Command command) throws NotRegisteredException {
+ registry.unregister(command);
+ }
+
+ public Command lookup(String s) throws NotRegisteredException {
+ return registry.lookup(s);
+ }
+
+ public Collection<Command> commands() {
+ return registry.commands();
+ }
+}
Added:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/gshell/commands.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/gshell/commands.xml?rev=583058&view=auto
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/gshell/commands.xml
(added)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/gshell/commands.xml
Mon Oct 8 23:38:54 2007
@@ -0,0 +1,55 @@
+<command-set>
+
<id>org.apache.geronimo.gshell.commands:gshell-builtins:jar:1.0-alpha-1-SNAPSHOT</id>
+ <commands>
+ <command>
+ <id>echo</id>
+
<implementation>org.apache.geronimo.gshell.commands.builtins.EchoCommand</implementation>
+ <description>Echo or print arguments to STDOUT</description>
+ </command>
+ <command>
+ <id>exit</id>
+
<implementation>org.apache.geronimo.gshell.commands.builtins.ExitCommand</implementation>
+ <description>Exit the shell</description>
+ </command>
+ <command>
+ <id>help</id>
+
<implementation>org.apache.geronimo.gshell.commands.builtins.HelpCommand</implementation>
+ <description>Show command help</description>
+ <requirements>
+ <requirement>
+ <name>commandRegistry</name>
+ <type>org.apache.geronimo.gshell.registry.CommandRegistry</type>
+ </requirement>
+ <requirement>
+ <name>layoutManager</name>
+ <type>org.apache.geronimo.gshell.layout.LayoutManager</type>
+ </requirement>
+ <requirement>
+ <name>branding</name>
+ <type>org.apache.geronimo.gshell.branding.Branding</type>
+ </requirement>
+ </requirements>
+ </command>
+ <command>
+ <id>set</id>
+
<implementation>org.apache.geronimo.gshell.commands.builtins.SetCommand</implementation>
+ <description>Set a variable</description>
+ </command>
+ <command>
+ <id>source</id>
+
<implementation>org.apache.geronimo.gshell.commands.builtins.SourceCommand</implementation>
+ <description>Load a file/url into the current shell</description>
+ <requirements>
+ <requirement>
+ <name>executor</name>
+ <type>org.apache.geronimo.gshell.command.CommandExecutor</type>
+ </requirement>
+ </requirements>
+ </command>
+ <command>
+ <id>unset</id>
+
<implementation>org.apache.geronimo.gshell.commands.builtins.UnsetCommand</implementation>
+ <description>Unset a variable</description>
+ </command>
+ </commands>
+</command-set>
\ No newline at end of file
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/components.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/components.xml?rev=583058&r1=583057&r2=583058&view=diff
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/components.xml
(original)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/components.xml
Mon Oct 8 23:38:54 2007
@@ -36,6 +36,22 @@
</requirements>
</component>
<component>
+ <role>org.apache.geronimo.gshell.console.PromptReader</role>
+
<implementation>org.apache.geronimo.gshell.console.PromptReader</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>jline.Terminal</role>
+ <field-name>terminal</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.geronimo.gshell.command.IO</role>
+ <field-name>io</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
<role>org.codehaus.plexus.component.factory.ComponentFactory</role>
<role-hint>Terminal</role-hint>
<implementation>org.apache.geronimo.gshell.console.TerminalFactory</implementation>
@@ -59,10 +75,6 @@
<isolated-realm>false</isolated-realm>
<requirements>
<requirement>
- <role>org.codehaus.plexus.PlexusContainer</role>
- <field-name>container</field-name>
- </requirement>
- <requirement>
<role>org.apache.geronimo.gshell.layout.LayoutManager</role>
<field-name>layoutManager</field-name>
</requirement>
@@ -166,6 +178,7 @@
<implementation>org.apache.geronimo.gshell.lookup.IOLookup</implementation>
<isolated-realm>false</isolated-realm>
</component>
+ <!--
<component>
<role>org.codehaus.plexus.component.discovery.ComponentDiscoverer</role>
<role-hint>command</role-hint>
@@ -188,15 +201,17 @@
</requirement>
</requirements>
</component>
+ -->
<component>
<role>org.apache.geronimo.gshell.registry.CommandRegistry</role>
<role-hint>default</role-hint>
<implementation>org.apache.geronimo.gshell.registry.DefaultCommandRegistry</implementation>
+ <instantiation-strategy>singleton-keep-alive</instantiation-strategy>
<isolated-realm>false</isolated-realm>
</component>
<component>
- <role>org.apache.geronimo.gshell.URLHandlerFactory</role>
-
<implementation>org.apache.geronimo.gshell.URLHandlerFactory</implementation>
+ <role>org.apache.geronimo.gshell.url.URLHandlerFactory</role>
+
<implementation>org.apache.geronimo.gshell.url.DefaultURLHandlerFactory</implementation>
<instantiation-strategy>singleton-keep-alive</instantiation-strategy>
<isolated-realm>false</isolated-realm>
<requirements>
@@ -207,5 +222,256 @@
</requirement>
</requirements>
</component>
- </components>
-</component-set>
+ <component>
+ <role>org.apache.geronimo.gshell.parser.CommandLineParser</role>
+
<implementation>org.apache.geronimo.gshell.parser.CommandLineParser</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+ <role>org.apache.geronimo.gshell.remote.RemoteShell</role>
+
<implementation>org.apache.geronimo.gshell.remote.server.DefaultRemoteShell</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>org.apache.geronimo.gshell.shell.ShellInfo</role>
+ <field-name>shellInfo</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.geronimo.gshell.command.CommandExecutor</role>
+ <field-name>executor</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.geronimo.gshell.shell.Environment</role>
+ <field-name>env</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.server.handler.ServerMessageHandler</role>
+ <role-hint>close-shell</role-hint>
+
<implementation>org.apache.geronimo.gshell.remote.server.handler.CloseShellHandler</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.server.handler.ServerMessageHandler</role>
+ <role-hint>connect</role-hint>
+
<implementation>org.apache.geronimo.gshell.remote.server.handler.ConnectHandler</implementation>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>org.apache.geronimo.gshell.remote.crypto.CryptoContext</role>
+ <field-name>crypto</field-name>
+ </requirement>
+ <requirement>
+
<role>org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager</role>
+ <field-name>timeoutManager</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.server.handler.ServerMessageHandler</role>
+ <role-hint>echo</role-hint>
+
<implementation>org.apache.geronimo.gshell.remote.server.handler.EchoHandler</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.server.handler.ServerMessageHandler</role>
+ <role-hint>execute</role-hint>
+
<implementation>org.apache.geronimo.gshell.remote.server.handler.ExecuteHandler</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.server.handler.ServerMessageHandler</role>
+ <role-hint>login</role-hint>
+
<implementation>org.apache.geronimo.gshell.remote.server.handler.LoginHandler</implementation>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+
<role>org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager</role>
+ <field-name>timeoutManager</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.server.handler.ServerMessageHandler</role>
+ <role-hint>open-shell</role-hint>
+
<implementation>org.apache.geronimo.gshell.remote.server.handler.OpenShellHandler</implementation>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.PlexusContainer</role>
+ <field-name>container</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+ <role>org.apache.geronimo.gshell.remote.server.RshServer</role>
+
<implementation>org.apache.geronimo.gshell.remote.server.RshServer</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+
<role>org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager</role>
+ <field-name>timeoutManager</field-name>
+ </requirement>
+ <requirement>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportFactoryLocator</role>
+ <field-name>locator</field-name>
+ </requirement>
+ <requirement>
+
<role>org.apache.geronimo.gshell.remote.server.handler.ServerMessageHandler</role>
+ <role-hints/>
+ <field-name>handlers</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager</role>
+
<implementation>org.apache.geronimo.gshell.remote.server.timeout.DefaultTimeoutManager</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+ <role>java.net.URLStreamHandler</role>
+ <role-hint>rfile</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.rfile.RemoteFileURLStreamHandler</implementation>
+ <instantiation-strategy>singleton</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+ <role>org.apache.geronimo.gshell.whisper.ssl.SSLContextFactory</role>
+ <role-hint>bogus</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.ssl.BogusSSLContextFactory</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.base.AddressFactory</role>
+ <role-hint>ssl</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.ssl.SslAddressFactory</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+ <role>org.apache.geronimo.gshell.whisper.transport.Transport</role>
+ <role-hint>ssl</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.ssl.SslTransport</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+
<role>org.apache.geronimo.gshell.whisper.ssl.SSLContextFactory</role>
+ <field-name>contextFactory</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportFactory</role>
+ <role-hint>ssl</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.ssl.SslTransportFactory</implementation>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.PlexusContainer</role>
+ <field-name>container</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportServer</role>
+ <role-hint>ssl</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.ssl.SslTransportServer</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+
<role>org.apache.geronimo.gshell.whisper.ssl.SSLContextFactory</role>
+ <field-name>contextFactory</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.base.AddressFactory</role>
+ <role-hint>tcp</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.tcp.TcpAddressFactory</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+ <role>org.apache.geronimo.gshell.whisper.transport.Transport</role>
+ <role-hint>tcp</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransport</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportFactory</role>
+ <role-hint>tcp</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransportFactory</implementation>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.PlexusContainer</role>
+ <field-name>container</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportServer</role>
+ <role-hint>tcp</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransportServer</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportFactoryLocator</role>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.TransportFactoryLocator</implementation>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.PlexusContainer</role>
+ <field-name>container</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.base.AddressFactory</role>
+ <role-hint>vm</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.vm.VmAddressFactory</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+ <role>org.apache.geronimo.gshell.whisper.transport.Transport</role>
+ <role-hint>vm</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.vm.VmTransport</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportFactory</role>
+ <role-hint>vm</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.vm.VmTransportFactory</implementation>
+ <isolated-realm>false</isolated-realm>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.PlexusContainer</role>
+ <field-name>container</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.whisper.transport.TransportServer</role>
+ <role-hint>vm</role-hint>
+
<implementation>org.apache.geronimo.gshell.whisper.transport.vm.VmTransportServer</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+ <role>org.apache.geronimo.gshell.remote.crypto.CryptoContext</role>
+
<implementation>org.apache.geronimo.gshell.remote.crypto.CryptoContext</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ <component>
+
<role>org.apache.geronimo.gshell.remote.jaas.JaasConfigurationHelper</role>
+
<implementation>org.apache.geronimo.gshell.remote.jaas.JaasConfigurationHelper</implementation>
+ <isolated-realm>false</isolated-realm>
+ </component>
+ </components>
+</component-set>
\ No newline at end of file
Modified:
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/plexus.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/plexus.xml?rev=583058&r1=583057&r2=583058&view=diff
==============================================================================
---
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/plexus.xml
(original)
+++
incubator/servicemix/branches/osgi/gshell/gshell-osgi/gshell-service/src/main/resources/META-INF/plexus/plexus.xml
Mon Oct 8 23:38:54 2007
@@ -18,7 +18,7 @@
under the License.
-->
-<!-- $Rev: 581061 $ $Date: 2007-10-01 22:18:31 +0200 (Mon, 01 Oct 2007) $ -->
+<!-- $Rev: 582181 $ $Date: 2007-10-05 11:57:38 +0200 (Fri, 05 Oct 2007) $ -->
<plexus>
<component-discoverer-manager
implementation="org.codehaus.plexus.component.discovery.DefaultComponentDiscovererManager">
@@ -50,7 +50,8 @@
<component>
<role>org.apache.geronimo.gshell.registry.CommandRegistry</role>
<role-hint>default</role-hint>
-
<implementation>org.apache.geronimo.gshell.registry.DefaultCommandRegistry</implementation>
+
<implementation>org.apache.geronimo.gshell.osgi.OsgiCommandRegistry</implementation>
+
<instantiation-strategy>singleton-keep-alive</instantiation-strategy>
</component>
<!--
@@ -71,7 +72,7 @@
</requirement>
</requirements>
</component>
-
+
<!--
Add our instance lookup components.
-->