Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2861 - in development/laboratory/users/niclas/osgi/console: . api/src/main/net/dpml/console commands commands/src/main/net/dpml/console/commands commands/src/main/net/dpml/console/commands/bundle commands/src/test/net/dpml/console/test impl impl/src/main/net/dpml/console/impl socket/src/main/net/dpml/console/socket xmpp xmpp/src/main/net/dpml/console/xmpp

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2861 - in development/laboratory/users/niclas/osgi/console: . api/src/main/net/dpml/console commands commands/src/main/net/dpml/console/commands commands/src/main/net/dpml/console/commands/bundle commands/src/test/net/dpml/console/test impl impl/src/main/net/dpml/console/impl socket/src/main/net/dpml/console/socket xmpp xmpp/src/main/net/dpml/console/xmpp
  • Date: Tue, 14 Jun 2005 23:31:43 -0400

Author: niclas AT hedhman.org
Date: Tue Jun 14 23:31:43 2005
New Revision: 2861

Added:
development/laboratory/users/niclas/osgi/console/
- copied from r2830, development/planet/components/console/

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/LoginCmd.java
(contents, props changed)

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/bundle/

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/bundle/CommandActivator.java
(contents, props changed)

development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/ConsoleActivator.java
(contents, props changed)
Removed:

development/laboratory/users/niclas/osgi/console/commands/src/test/net/dpml/console/test/TestCommandInterpreter.java

development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/LoginCmd.java
Modified:

development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/CommandConnectionProvider.java

development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/CommandInterpreter.java

development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/Console.java

development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/ConsoleCommand.java
development/laboratory/users/niclas/osgi/console/build.xml
development/laboratory/users/niclas/osgi/console/commands/build.xml

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/DeployCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/DummyCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/EchoCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ExitCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/HelpCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ListCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/RedeployCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/SelectCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ShowModelCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ThreadCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/UndeployCmd.java

development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/UrlUtils.java

development/laboratory/users/niclas/osgi/console/commands/src/test/net/dpml/console/test/EchoCommandTestCase.java

development/laboratory/users/niclas/osgi/console/commands/src/test/net/dpml/console/test/TestConsole.java
development/laboratory/users/niclas/osgi/console/impl/build.xml

development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/CommandInterpreterImpl.java

development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/ConsoleImpl.java
development/laboratory/users/niclas/osgi/console/index.xml
development/laboratory/users/niclas/osgi/console/module.xml

development/laboratory/users/niclas/osgi/console/socket/src/main/net/dpml/console/socket/SocketCommandConnection.java

development/laboratory/users/niclas/osgi/console/socket/src/main/net/dpml/console/socket/SocketProvider.java
development/laboratory/users/niclas/osgi/console/xmpp/build.xml

development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppCommandConnection.java

development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppProvider.java

development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppReader.java

development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppWriter.java
Log:
Modified the Console facility to become a OSGi bundle, and playing around
with the Availability issue in OSGi environments. More work needed on
Manifest generation before this will work.

Modified:
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/CommandConnectionProvider.java
==============================================================================
---
development/planet/components/console/api/src/main/net/dpml/console/CommandConnectionProvider.java
(original)
+++
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/CommandConnectionProvider.java
Tue Jun 14 23:31:43 2005
@@ -16,8 +16,6 @@
package net.dpml.console;

/** Interface for the Connection Provider.
- *
- * @metro.service name="net.dpml.console.CommandConnectionProvider"
*/
public interface CommandConnectionProvider
{

Modified:
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/CommandInterpreter.java
==============================================================================
---
development/planet/components/console/api/src/main/net/dpml/console/CommandInterpreter.java
(original)
+++
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/CommandInterpreter.java
Tue Jun 14 23:31:43 2005
@@ -15,7 +15,7 @@
*/
package net.dpml.console;

-import net.dpml.composition.model.ContainmentModel;
+

public interface CommandInterpreter
{
@@ -24,9 +24,5 @@
void removeCommand( String commandname );

void close();
-
- ContainmentModel getCurrentContainer();
-
- void setCurrentContainer( ContainmentModel node );
}


Modified:
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/Console.java
==============================================================================
---
development/planet/components/console/api/src/main/net/dpml/console/Console.java
(original)
+++
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/Console.java
Tue Jun 14 23:31:43 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 Niclas Hedman.
+ * Copyright 2005 Niclas Hedman.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
import java.util.Collection;

/** Interface for the console.
- *
- * @metro.service name="net.dpml.console.Console" version="1.0"
*/
public interface Console
{

Modified:
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/ConsoleCommand.java
==============================================================================
---
development/planet/components/console/api/src/main/net/dpml/console/ConsoleCommand.java
(original)
+++
development/laboratory/users/niclas/osgi/console/api/src/main/net/dpml/console/ConsoleCommand.java
Tue Jun 14 23:31:43 2005
@@ -17,10 +17,9 @@

import java.io.BufferedReader;
import java.io.BufferedWriter;
+import java.util.Map;

/** Interface for a console command.
- *
- * @metro.service name="net.dpml.console.ConsoleCommand" version="1.0"
*/
public interface ConsoleCommand
{
@@ -34,7 +33,7 @@
*/
String getDescription();

- void execute( CommandInterpreter intp,
+ void execute( Map context,
BufferedReader input, BufferedWriter output,
String[] arguments )
throws Exception;

Modified: development/laboratory/users/niclas/osgi/console/build.xml
==============================================================================
--- development/planet/components/console/build.xml (original)
+++ development/laboratory/users/niclas/osgi/console/build.xml Tue Jun 14
23:31:43 2005
@@ -6,9 +6,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.dpml.net/central/about/legal/
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
* limitations under the License.
-->

-<project name="runtime" default="default" basedir="."
+<project name="runtime" default="default" basedir="."
xmlns:transit="antlib:net.dpml.transit" >

<transit:import uri="artifact:template:dpml/magic/reactor"/>

Modified: development/laboratory/users/niclas/osgi/console/commands/build.xml
==============================================================================
--- development/planet/components/console/commands/build.xml (original)
+++ development/laboratory/users/niclas/osgi/console/commands/build.xml Tue
Jun 14 23:31:43 2005
@@ -17,7 +17,7 @@
-->

<project name="dpml-console-commands" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit" >
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">

<transit:import uri="artifact:template:dpml/magic/standard"/>


Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/DeployCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/DeployCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/DeployCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,34 +15,31 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.net.URL;
-
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.model.DeploymentModel;
import net.dpml.console.CommandException;
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;
-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
-import net.dpml.service.Serviceable;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.net.URL;
+import java.util.Dictionary;
+import java.util.Map;

/**
- * @metro.component name="console-decommissionmodel" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
*/
public class DeployCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand, ManagedService
{
private String m_Name;
- private File m_WorkingDir;
-
+
+ public DeployCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -54,46 +51,18 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- * @metro.entry key="urn:metro:home"
- * type="java.io.File"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- m_WorkingDir = (File) ctx.get( "urn:metro:home" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
if( arguments.length == 0 )
throw new CommandException( "block must be specified." );

String block = arguments[0];
- ContainmentModel current = intp.getCurrentContainer();
+ ContainmentModel current = (ContainmentModel) context.get(
"CurrentContainer" );
+ if( current == null )
+ {
+ throw new CommandException( "No ContainmentModel available yet."
);
+ }
String target = current.getQualifiedName();
if( arguments.length > 0 )
target = arguments[1];
@@ -103,11 +72,11 @@

if( model instanceof ContainmentModel )
{
- URL blockUrl = UrlUtils.resolveURL( m_WorkingDir, block );
+ URL blockUrl = UrlUtils.resolveURL( block );
ContainmentModel container = (ContainmentModel) model;
ContainmentModel newContainer = container.addContainmentModel(
blockUrl );
newContainer.commission();
- intp.setCurrentContainer( newContainer );
+ context.put( "CurrentContainer", newContainer );
}
else
throw new CommandException( "Can only deploy into a container."
);
@@ -115,5 +84,15 @@
output.newLine();
output.flush();
}
+
+ public void updated( Dictionary dictionary )
+ throws ConfigurationException
+ {
+ String newName = (String) dictionary.get( "Name" );
+ if( newName != null )
+ {
+ m_Name = newName;
+ }
+ }
}


Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/DummyCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/DummyCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/DummyCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,31 +15,23 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;

-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-
-import net.dpml.service.Serviceable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;

-/**
- * @metro.component name="console-dummy" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
- */
public class DummyCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
private String m_Name;


+ public DummyCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -51,37 +43,7 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
output.newLine();

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/EchoCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/EchoCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/EchoCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,30 +15,22 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;

-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-
-import net.dpml.service.Serviceable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;

-/**
- * @metro.component name="console-echo" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
- */
public class EchoCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
private String m_Name;

+ public EchoCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -50,36 +42,7 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
output.newLine();

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ExitCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/ExitCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ExitCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,30 +15,24 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;

-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-
-import net.dpml.service.Serviceable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;

/**
- * @metro.component name="console-exit" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
*/
public class ExitCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
private String m_Name;

+ public ExitCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -50,36 +44,7 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map contxt, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
output.write( "Logging out..." );

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/HelpCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/HelpCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/HelpCmd.java
Tue Jun 14 23:31:43 2005
@@ -16,33 +16,26 @@
package net.dpml.console.commands;


-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
-import java.util.Iterator;
-
-import net.dpml.console.CommandInterpreter;
import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;

-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-
-import net.dpml.service.Serviceable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Iterator;
+import java.util.Map;

/**
- * @metro.component name="console-help" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
*/
public class HelpCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
- private Console m_Console;
private String m_Name;
-
+
+ public HelpCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -54,38 +47,10 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- m_Console = (Console) man.lookup( "console" );
- m_Console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
+ Console console = (Console) context.get( "Console" );
output.newLine();
if( arguments.length == 0 )
{
@@ -93,7 +58,7 @@
output.newLine();
output.write( "===================" );
output.newLine();
- Iterator list = m_Console.getCommandNames().iterator();
+ Iterator list = console.getCommandNames().iterator();
while( list.hasNext() )
{
output.write( list.next().toString() );
@@ -103,7 +68,7 @@
{
for( int i=0 ; i < arguments.length ; i++ )
{
- ConsoleCommand cmd = m_Console.getCommand( arguments[i] );
+ ConsoleCommand cmd = console.getCommand( arguments[i] );
if( cmd != null )
{
String descr = cmd.getDescription();

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ListCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/ListCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ListCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,33 +15,26 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.model.DeploymentModel;
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;
-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
-import net.dpml.service.Serviceable;

-/**
- * @metro.component name="console-showmodel" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
- */
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;
+
public class ListCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
- String LINE =
- "\n-----------------------------------------------------------";
+ String LINE =
"\n-----------------------------------------------------------";

private String m_Name;

+ public ListCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -53,40 +46,11 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
output.newLine();
- ContainmentModel current = intp.getCurrentContainer();
+ ContainmentModel current = (ContainmentModel) context.get(
"CurrentContainer" );
String path;
if( arguments.length == 0 )
path = current.getQualifiedName();

Added:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/LoginCmd.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/LoginCmd.java
Tue Jun 14 23:31:43 2005
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2004 Niclas Hedman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.dpml.console.commands;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;
+
+import net.dpml.console.CommandInterpreter;
+import net.dpml.console.Console;
+import net.dpml.console.ConsoleCommand;
+import net.dpml.console.LoginException;
+
+import net.dpml.context.Context;
+import net.dpml.context.ContextException;
+
+import net.dpml.parameters.ParameterException;
+import net.dpml.parameters.Parameters;
+
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ */
+public class LoginCmd
+ implements ConsoleCommand
+{
+ private String m_Password;
+ private String m_Name;
+
+ public LoginCmd( String name, String rootPassword )
+ {
+ m_Name = name;
+ m_Password = rootPassword;
+ }
+
+ public String getName()
+ {
+ return m_Name;
+ }
+
+ public String getDescription()
+ {
+ String str = "usage: " + m_Name + "\n\nLogin to the system. This
command is executed automatically.";
+ return str;
+ }
+
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
+ throws Exception
+ {
+ output.write( "Password:" );
+ output.flush();
+ String password = input.readLine();
+ if( password != null )
+ {
+ if( ! password.trim().equals( m_Password ) )
+ throw new LoginException();
+ }
+ output.newLine();
+ output.write( "Login successful." );
+ output.newLine();
+ output.newLine();
+ output.flush();
+ }
+}

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/RedeployCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/RedeployCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/RedeployCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,30 +15,24 @@
*/
package net.dpml.console.commands;

+import net.dpml.console.ConsoleCommand;
+
import java.io.BufferedReader;
import java.io.BufferedWriter;
-import java.io.File;
-
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
-import net.dpml.console.ConsoleCommand;
-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
-import net.dpml.service.Serviceable;
+import java.util.Map;

/**
- * @metro.component name="console-decommissionmodel" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
*/
public class RedeployCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
private String m_Name;
- private File m_WorkingDir;
-
+
+ public RedeployCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -50,41 +44,10 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- * @metro.entry key="urn:metro:home"
- * type="java.io.File"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- m_WorkingDir = (File) ctx.get( "urn:metro:home" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
+ output.write( "Not implemented yet!" );
output.newLine();
output.flush();
}

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/SelectCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/SelectCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/SelectCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,33 +15,26 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.model.DeploymentModel;
-
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;

-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-
-import net.dpml.service.Serviceable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;

/**
- * @metro.component name="console-echo" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
*/
public class SelectCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
private String m_Name;

+ public SelectCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -53,45 +46,16 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
if( arguments.length > 0 )
{
- ContainmentModel current = intp.getCurrentContainer();
+ ContainmentModel current = (ContainmentModel) context.get(
"CurrentContainer" );
DeploymentModel dm = current.getModel( arguments[0] );
if( dm instanceof ContainmentModel )
{
- intp.setCurrentContainer( (ContainmentModel) dm );
+ context.put( "CurrentContainer", dm );
}
else
{

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ShowModelCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/ShowModelCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ShowModelCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,34 +15,29 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
import net.dpml.composition.model.ComponentModel;
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.model.DeploymentModel;
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;
-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
-import net.dpml.service.Serviceable;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;

/**
- * @metro.component name="console-showmodel" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
*/
public class ShowModelCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
- String LINE =
- "\n-----------------------------------------------------------";
+ String LINE =
"\n-----------------------------------------------------------";

private String m_Name;

+ public ShowModelCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -54,40 +49,11 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
output.newLine();
- ContainmentModel current = intp.getCurrentContainer();
+ ContainmentModel current = (ContainmentModel) context.get(
"CurrentContainer" );
String path;
if( arguments.length == 0 )
path = current.getPath();

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ThreadCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/ThreadCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/ThreadCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,30 +15,22 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;

-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-
-import net.dpml.service.Serviceable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;

-/**
- * @metro.component name="console-thread" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
- */
public class ThreadCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
private String m_Name;

+ public ThreadCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -50,36 +42,7 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
ThreadGroup tg = Thread.currentThread().getThreadGroup();

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/UndeployCmd.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/UndeployCmd.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/UndeployCmd.java
Tue Jun 14 23:31:43 2005
@@ -15,31 +15,27 @@
*/
package net.dpml.console.commands;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.model.DeploymentModel;
import net.dpml.console.CommandException;
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
import net.dpml.console.ConsoleCommand;
-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-import net.dpml.context.Contextualizable;
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
-import net.dpml.service.Serviceable;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.util.Map;

/**
- * @metro.component name="console-decommissionmodel" lifestyle="singleton"
- * @metro.service type="net.dpml.console.ConsoleCommand"
*/
public class UndeployCmd
- implements ConsoleCommand, Serviceable, Contextualizable
+ implements ConsoleCommand
{
private String m_Name;

+ public UndeployCmd( String name )
+ {
+ m_Name = name;
+ }
+
public String getName()
{
return m_Name;
@@ -51,43 +47,14 @@
return str;
}

- /**
- * Contextulaization of the listener by the container during
- * which we are supplied with the root composition model for
- * the application.
- *
- * @param ctx the supplied listener context
- *
- * @exception ContextException if a contextualization error occurs
- *
- * @metro.entry key="urn:metro:name"
- * type="java.lang.String"
- */
- public void contextualize( Context ctx )
- throws ContextException
- {
- m_Name = (String) ctx.get( "urn:metro:name" );
- }
-
- /**
- * @metro.dependency type="net.dpml.console.Console"
- * key="console"
- */
- public void service( ServiceManager man )
- throws ServiceException
- {
- Console console = (Console) man.lookup( "console" );
- console.addCommand( this );
- }
-
- public void execute( CommandInterpreter intp, BufferedReader input,
BufferedWriter output, String[] arguments )
+ public void execute( Map context, BufferedReader input, BufferedWriter
output, String[] arguments )
throws Exception
{
if( arguments.length == 0 )
throw new CommandException( "target must be specified." );

String target = arguments[0];
- ContainmentModel current = intp.getCurrentContainer();
+ ContainmentModel current = (ContainmentModel) context.get(
"CurrentContainer" );
ContainmentModel root = (ContainmentModel) current.getModel( "/" );

DeploymentModel dm = current.getModel( target );
@@ -103,7 +70,7 @@
container.decommission();
container.disassemble();
parent.removeModel( name );
- intp.setCurrentContainer( root );
+ context.put( "CurrentContainer", root );
}
else
throw new CommandException( "Can only undeploy a container." );

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/UrlUtils.java
==============================================================================
---
development/planet/components/console/commands/src/main/net/dpml/console/commands/UrlUtils.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/UrlUtils.java
Tue Jun 14 23:31:43 2005
@@ -15,16 +15,16 @@
*/
package net.dpml.console.commands;

+import net.dpml.console.CommandException;
+
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

-import net.dpml.console.CommandException;
-
public class UrlUtils
{
- static URL resolveURL( File base, String value )
+ static URL resolveURL( String value )
throws Exception
{
if( value.startsWith( "artifact:" ) )
@@ -45,15 +45,7 @@
}
else
{
- target = new File( base, value );
- if( target.exists() )
- {
- return toURL( target );
- }
- else
- {
- throw new CommandException( "Unable to resolve URL: " +
value );
- }
+ throw new CommandException( "Unable to resolve URL: " +
value );
}
}
}

Added:
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/bundle/CommandActivator.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/osgi/console/commands/src/main/net/dpml/console/commands/bundle/CommandActivator.java
Tue Jun 14 23:31:43 2005
@@ -0,0 +1,90 @@
+package net.dpml.console.commands.bundle;
+
+import net.dpml.console.ConsoleCommand;
+import net.dpml.console.commands.DeployCmd;
+import net.dpml.console.commands.DummyCmd;
+import net.dpml.console.commands.EchoCmd;
+import net.dpml.console.commands.ExitCmd;
+import net.dpml.console.commands.HelpCmd;
+import net.dpml.console.commands.ListCmd;
+import net.dpml.console.commands.RedeployCmd;
+import net.dpml.console.commands.SelectCmd;
+import net.dpml.console.commands.ShowModelCmd;
+import net.dpml.console.commands.ThreadCmd;
+import net.dpml.console.commands.UndeployCmd;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+import java.util.Hashtable;
+
+public class CommandActivator
+ implements BundleActivator
+{
+ private BundleContext m_BundleContext;
+
+ private ServiceRegistration m_Undeploy;
+ private ServiceRegistration m_Deploy;
+ private ServiceRegistration m_Dummy1;
+ private ServiceRegistration m_Dummy2;
+ private ServiceRegistration m_Echo;
+ private ServiceRegistration m_Exit;
+ private ServiceRegistration m_Quit;
+ private ServiceRegistration m_Help;
+ private ServiceRegistration m_List1;
+ private ServiceRegistration m_List2;
+ private ServiceRegistration m_Redploy;
+ private ServiceRegistration m_Select;
+ private ServiceRegistration m_Cd;
+ private ServiceRegistration m_ShowModels;
+ private ServiceRegistration m_ShowThreads;
+
+ public void start( BundleContext bundleContext )
+ throws Exception
+ {
+ m_BundleContext = bundleContext;
+ m_Deploy = register( new DeployCmd( "deploy" ) );
+ m_Dummy1 = register( new DummyCmd( "dummy" ) );
+ m_Dummy2 = register( new DummyCmd( "" ) );
+ m_Echo = register( new EchoCmd( "echo" ) );
+ m_Exit = register( new ExitCmd( "exit" ) );
+ m_Quit = register( new ExitCmd( "quit" ) );
+ m_Help = register( new HelpCmd( "help" ) );
+ m_List1 = register( new ListCmd( "list" ) );
+ m_List2 = register( new ListCmd( "ls" ) );
+ m_Redploy = register( new RedeployCmd( "redeploy" ));
+ m_Select = register( new SelectCmd( "select" ) );
+ m_Cd = register( new SelectCmd( "cd" ) );
+ m_ShowModels = register( new ShowModelCmd( "show model" ) );
+ m_ShowThreads = register( new ThreadCmd( "show threads" ));
+ m_Undeploy = register( new UndeployCmd( "undeploy" ) );
+ }
+
+ private ServiceRegistration register( ConsoleCommand cmd )
+ {
+ Hashtable dict = new Hashtable();
+ dict.put( "Name", cmd.getName() );
+ String name = "net.dpml.console.ConsoleCommand";
+ return m_BundleContext.registerService( name, cmd, dict );
+ }
+
+ public void stop( BundleContext bundleContext )
+ throws Exception
+ {
+ m_Undeploy.unregister();
+ m_Deploy.unregister();
+ m_Dummy1.unregister();
+ m_Dummy2.unregister();
+ m_Echo.unregister();
+ m_Exit.unregister();
+ m_Quit.unregister();
+ m_Help.unregister();
+ m_List1.unregister();
+ m_List2.unregister();
+ m_Redploy.unregister();
+ m_Select.unregister();
+ m_Cd.unregister();
+ m_ShowModels.unregister();
+ m_ShowThreads.unregister();
+ }
+}

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/test/net/dpml/console/test/EchoCommandTestCase.java
==============================================================================
---
development/planet/components/console/commands/src/test/net/dpml/console/test/EchoCommandTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/test/net/dpml/console/test/EchoCommandTestCase.java
Tue Jun 14 23:31:43 2005
@@ -1,12 +1,12 @@
/*
- * Copyright 2004 Niclas Hedman.
- *
+ * Copyright 2005 Niclas Hedman.
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,57 +15,52 @@
*/
package net.dpml.console.test;

-import java.io.*;
-import java.util.*;
import junit.framework.TestCase;
+import net.dpml.console.Console;
+import net.dpml.console.commands.EchoCmd;

-import net.dpml.context.*;
-import net.dpml.service.*;
-import net.dpml.metro.unit.*;
-
-import net.dpml.console.*;
-import net.dpml.console.commands.*;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.HashMap;

public class EchoCommandTestCase extends TestCase
{
private final String IN_DATA = "This is a TEST with Svenska åäöÅÄÖ.";
-
+
private EchoCmd m_Command;
- private CommandInterpreter m_Intp;
-
+
private ByteArrayOutputStream m_OutBuffer;
private BufferedReader m_Reader;
private BufferedWriter m_Writer;
-
+
public void setUp()
throws Exception
{
- Context ctx = new TestContext();
+ m_Command = new EchoCmd( "unit-test" );
Console console = new TestConsole();
- HashMap deps = new HashMap();
- deps.put( "console", console );
- ServiceManager man = new TestServiceManager( deps );
- m_Command = new EchoCmd();
- m_Command.contextualize( ctx );
- m_Command.service( man );
- m_Intp = new TestCommandInterpreter();
-
+ console.addCommand( m_Command );
+
ByteArrayInputStream in = new ByteArrayInputStream(
IN_DATA.getBytes() );
InputStreamReader isr = new InputStreamReader( in, "UTF-8" );
m_Reader = new BufferedReader( isr );
-
+
m_OutBuffer = new ByteArrayOutputStream();
OutputStreamWriter osw = new OutputStreamWriter( m_OutBuffer,
"UTF-8" );
m_Writer = new BufferedWriter( osw );
}
-
+
public void testCommand()
throws Exception
{
assertEquals( "name", "unit-test", m_Command.getName() );
assertEquals( "description", "usage: unit-test (string)*\n\nSends
each of the string arguments back separate by a space.",
m_Command.getDescription() );
String[] args = new String[] { IN_DATA, "abc", "def" };
- m_Command.execute( m_Intp, m_Reader, m_Writer, args );
+ HashMap context = new HashMap();
+ m_Command.execute( context, m_Reader, m_Writer, args );
byte[] data = m_OutBuffer.toByteArray();
String result = new String( data, "UTF-8" ).trim();
assertEquals( "data", "echo: " + IN_DATA + " abc def", result );

Modified:
development/laboratory/users/niclas/osgi/console/commands/src/test/net/dpml/console/test/TestConsole.java
==============================================================================
---
development/planet/components/console/commands/src/test/net/dpml/console/test/TestConsole.java
(original)
+++
development/laboratory/users/niclas/osgi/console/commands/src/test/net/dpml/console/test/TestConsole.java
Tue Jun 14 23:31:43 2005
@@ -15,10 +15,11 @@
*/
package net.dpml.console.test;

-import java.util.*;
+import net.dpml.console.Console;
+import net.dpml.console.ConsoleCommand;

-import net.dpml.console.Console;
-import net.dpml.console.ConsoleCommand;
+import java.util.Collection;
+import java.util.HashMap;

class TestConsole
implements Console

Modified: development/laboratory/users/niclas/osgi/console/impl/build.xml
==============================================================================
--- development/planet/components/console/impl/build.xml (original)
+++ development/laboratory/users/niclas/osgi/console/impl/build.xml Tue
Jun 14 23:31:43 2005
@@ -17,8 +17,63 @@
-->

<project name="dpml-console-impl" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit" >
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">

<transit:import uri="artifact:template:dpml/magic/standard"/>

+ <target name="build" depends="standard.build">
+ <mkdir dir="target/manifest/" />
+ <x:property name="version" feature="version" />
+ <tstamp/>
+ <x:path mode="runtime" id="runtime-path" />
+ <pathconvert
+ dirsep="/"
+ pathsep=","
+ property="classpath"
+ refid="runtime-path"
+ >
+ <mapper type="flatten"/>
+ </pathconvert>
+ <manifest file="target/manifest/MANIFEST.MF" >
+ <attribute name="Built-By" value="${user.name}"/>
+ <attribute name="Specification-Title" value=""/>
+ <attribute name="Specification-Version" value="1.0"/>
+ <attribute name="Specification-Vendor" value="Digital Product Meta
Library"/>
+ <attribute name="Implementation-Title" value="DPML Console OSGi
Bundle"/>
+ <attribute name="Implementation-Version" value="${version}
${DSTAMP}"/>
+ <attribute name="Implementation-Vendor" value="Digital Product Meta
Library"/>
+
+ <attribute name="Bundle-Activator"
value="net.dpml.console.osgi.ConsoleActivator" />
+ <attribute name="Bundle-Category" value="container, platform"/>
+ <attribute name="Bundle-ClassPath" value=".,${classpath}"/>
+ <attribute name="Bundle-ContactAddress"
value="http://www.dpml.net/about"/>
+ <attribute name="Bundle-Copyright" value="Copyright 2005 Digital
Product Meta Library"/>
+ <attribute name="Bundle-Description" value="DPML command console for
management of running Metro instances."/>
+ <attribute name="Bundle-DocURL"
value="http://planet.dpml.net/osgi/console"/>
+ <attribute name="Bundle-Name" value="DPML Console"/>
+ <!--
+ <attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE"/>
+ -->
+ <attribute name="Bundle-UpdateLocation"
value="http://repository.dpml.net/classic/dpml/planet/console/jars/dpml-console-bundle.jar"/>
+ <attribute name="Bundle-Vendor" value="DPML"/>
+ <attribute name="Bundle-Version" value="${version}"/>
+ <attribute name="Import-Package" value="org.osgi.service.log"/>
+ </manifest>
+ </target>
+
+ <target name="package" depends="standard.package">
+ <x:replicate todir="target/bundle-content/" flatten="true"/>
+ <x:property name="jarfilename" feature="filename" />
+ <x:property name="transitdir" feature="spec" key="dpml-transit-main" />
+ <jar destfile="target/deliverables/jars/${jarfilename}"
+ manifest="target/manifest/MANIFEST.MF" >
+ <fileset dir="target/classes/" >
+ <include name="**" />
+ </fileset>
+ <fileset dir="target/bundle-content/" >
+ <include name="**/*.jar" />
+ </fileset>
+ </jar>
+ </target>
+
</project>

Modified:
development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/CommandInterpreterImpl.java
==============================================================================
---
development/planet/components/console/impl/src/main/net/dpml/console/impl/CommandInterpreterImpl.java
(original)
+++
development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/CommandInterpreterImpl.java
Tue Jun 14 23:31:43 2005
@@ -15,41 +15,36 @@
*/
package net.dpml.console.impl;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import net.dpml.composition.model.ContainmentModel;
-
import net.dpml.console.CommandInterpreter;
import net.dpml.console.ConsoleCommand;
import net.dpml.console.LoginException;
+import org.osgi.service.log.LogService;

-import net.dpml.logging.Logger;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.StringTokenizer;

class CommandInterpreterImpl
implements CommandInterpreter, Runnable
{
private boolean m_Login;
+ private HashMap m_Commands;
+ private Thread m_Thread;
+ private HashMap m_Context;
private BufferedWriter m_Output;
private BufferedReader m_Input;
- private Map m_Commands;
- private ContainmentModel m_CurrentNode;
+ private LogService m_Logger;
private String m_Name;
- private Thread m_Thread;
- private Logger m_Logger;
-
- CommandInterpreterImpl( Logger logger, String name, BufferedReader
input, BufferedWriter output, Map commands, ContainmentModel root )
- throws IOException
+
+ CommandInterpreterImpl( String name, BufferedReader input,
BufferedWriter output )
{
- m_Logger = logger.getChildLogger( name );
m_Name = name;
m_Input = input;
m_Output = output;
- m_Commands = commands;
- m_CurrentNode = root;
+ m_Commands = new HashMap();
+ m_Context = new HashMap();
m_Thread = new Thread( this, "Console-" + name );
m_Thread.start();
}
@@ -62,14 +57,20 @@
m_Output.close();
} catch( IOException e )
{
- m_Logger.warn( "Can not close the Writer: " + m_Name );
+ if( getLogger() != null )
+ {
+ getLogger().log( LogService.LOG_WARNING, "Can not close the
Writer: " + m_Name );
+ }
}
try
{
m_Input.close();
} catch( IOException e )
{
- m_Logger.warn( "Can not close the Reader: " + m_Name );
+ if( getLogger() != null )
+ {
+ getLogger().log( LogService.LOG_WARNING, "Can not close the
Reader: " + m_Name );
+ }
}
m_Login = false;
}
@@ -89,16 +90,6 @@
m_Commands.remove( commandname );
}

- public ContainmentModel getCurrentContainer()
- {
- return m_CurrentNode;
- }
-
- public void setCurrentContainer( ContainmentModel node )
- {
- m_CurrentNode = node;
- }
-
public void run()
{
boolean running = true;
@@ -116,6 +107,13 @@
} catch( InterruptedException e )
{
running = false;
+ } catch( IOException e )
+ {
+ String mess = e.getMessage();
+ if( mess == null )
+ mess = "<null>";
+ errorMessage( mess );
+ e.printStackTrace();
} catch( Exception e )
{
String mess = e.getMessage();
@@ -130,7 +128,6 @@
private void execute( String cmdline )
throws Exception
{
- // TODO: Optimize parser.
StringTokenizer st = new StringTokenizer( cmdline, " ", false );
String cmd = "";
while( st.hasMoreTokens() )
@@ -140,7 +137,7 @@
if( cc != null )
{
String[] args = parseArguments( st );
- cc.execute( this, getInput(), getOutput(), args );
+ cc.execute( m_Context, m_Input, m_Output, args );
return;
}
}
@@ -153,8 +150,8 @@
String cmdline = "";
while( cmdline.length() == 0 )
{
- getOutput().write( "[" + m_Name + " " +
m_CurrentNode.getQualifiedName() + "]$ " );
- getOutput().flush();
+ m_Output.write( "[" + m_Name + " " + m_Context.get(
"CurrentNode" ) + "]$ " );
+ m_Output.flush();
cmdline = m_Input.readLine().trim();
}
return cmdline;
@@ -172,25 +169,23 @@
{
try
{
- getOutput().write( message );
- getOutput().newLine();
- getOutput().flush();
+ m_Output.write( message );
+ m_Output.newLine();
+ m_Output.flush();
} catch( IOException e )
{
e.printStackTrace( System.out );
}
}

- private BufferedWriter getOutput()
- throws IOException
+ LogService getLogger()
{
- return m_Output;
+ return m_Logger;
}

- private BufferedReader getInput()
- throws IOException
+ void setLogger( LogService logger )
{
- return m_Input;
+ m_Logger = logger;
}
}


Added:
development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/ConsoleActivator.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/ConsoleActivator.java
Tue Jun 14 23:31:43 2005
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2005 Niclas Hedman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.console.impl;
+
+import net.dpml.console.CommandConnectionProvider;
+import net.dpml.console.ConsoleCommand;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import org.osgi.service.log.LogService;
+
+import java.util.ArrayList;
+
+public class ConsoleActivator
+ implements BundleActivator
+{
+ private static final LogService MINIMAL_LOGGER = new MinimalLogger();
+
+ private ServiceTracker m_LogTracker;
+ private ConsoleImpl m_Console;
+ private ServiceTracker m_CommandTracker;
+ private BundleContext m_BundleContext;
+ private ServiceTracker m_ProviderTracker;
+ private ArrayList m_Providers;
+
+ public void start( BundleContext bundleContext )
+ throws Exception
+ {
+ m_BundleContext = bundleContext;
+ m_Providers = new ArrayList();
+ m_Console = new ConsoleImpl();
+ m_Console.setLogger( MINIMAL_LOGGER );
+
+ m_BundleContext.registerService( "net.dpml.console.Console",
m_Console, null );
+
+ m_LogTracker = new ServiceTracker( bundleContext,
"org.osgi.service.log.LogService", new LogServiceTracking() );
+ m_LogTracker.open();
+
+ m_CommandTracker = new ServiceTracker( bundleContext,
"net.dpml.console.ConsoleCommand", new CommandTracking() );
+ m_CommandTracker.open();
+
+ m_ProviderTracker = new ServiceTracker( bundleContext,
"net.dpml.console.CommandConnectionProvider", new ProviderTracking() );
+ m_ProviderTracker.open();
+ }
+
+ public void stop( BundleContext bundleContext )
+ throws Exception
+ {
+ m_LogTracker.close();
+ m_Console.dispose();
+ }
+
+ private class CommandTracking
+ implements ServiceTrackerCustomizer
+ {
+ public Object addingService( ServiceReference reference )
+ {
+ ConsoleCommand command = (ConsoleCommand)
m_BundleContext.getService( reference );
+ m_Console.addCommand( command );
+ return command;
+ }
+
+ public void modifiedService( ServiceReference serviceReference,
Object value )
+ {
+ }
+
+ public void removedService( ServiceReference serviceReference,
Object value )
+ {
+ ConsoleCommand command = (ConsoleCommand) value;
+ m_Console.removeCommand( command );
+ }
+ }
+
+ private class ProviderTracking
+ implements ServiceTrackerCustomizer
+ {
+ public Object addingService( ServiceReference reference )
+ {
+ CommandConnectionProvider provider= (CommandConnectionProvider)
m_BundleContext.getService( reference );
+ m_Providers.add( provider );
+ return provider;
+ }
+
+ public void modifiedService( ServiceReference serviceReference,
Object value )
+ {
+ //To change body of implemented methods use File | Settings |
File Templates.
+ }
+
+ public void removedService( ServiceReference serviceReference,
Object value )
+ {
+ m_Providers.remove( value );
+ }
+ }
+
+ private class LogServiceTracking
+ implements ServiceTrackerCustomizer
+ {
+ public Object addingService( ServiceReference reference )
+ {
+ LogService logger = (LogService) m_BundleContext.getService(
reference );
+ m_Console.setLogger( logger );
+ return logger;
+ }
+
+ public void modifiedService( ServiceReference serviceReference,
Object value )
+ {
+ //To change body of implemented methods use File | Settings |
File Templates.
+ }
+
+ public void removedService( ServiceReference serviceReference,
Object value )
+ {
+ m_Console.setLogger( MINIMAL_LOGGER );
+ }
+ }
+
+ static private class MinimalLogger
+ implements LogService
+ {
+ static private String[] LEVEL = new String[]
+ {
+ "", "ERROR", "WARNING", "INFO", "DEBUG"
+ };
+
+ public void log( int i, String s )
+ {
+ System.out.println( LEVEL[ i ] + " : " + s );
+ }
+
+ public void log( int i, String s, Throwable throwable )
+ {
+ System.out.println( LEVEL[ i ] + " : " + s );
+ }
+
+ public void log( ServiceReference serviceReference, int i, String s )
+ {
+ System.out.println( LEVEL[ i ] + " : " + s );
+ }
+
+ public void log( ServiceReference serviceReference, int i, String s,
Throwable throwable )
+ {
+ System.out.println( LEVEL[ i ] + " : " + s );
+ }
+ }
+}

Modified:
development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/ConsoleImpl.java
==============================================================================
---
development/planet/components/console/impl/src/main/net/dpml/console/impl/ConsoleImpl.java
(original)
+++
development/laboratory/users/niclas/osgi/console/impl/src/main/net/dpml/console/impl/ConsoleImpl.java
Tue Jun 14 23:31:43 2005
@@ -15,86 +15,64 @@
*/
package net.dpml.console.impl;

+import net.dpml.console.CommandConnection;
+import net.dpml.console.CommandConnectionListener;
+import net.dpml.console.CommandConnectionProvider;
+import net.dpml.console.CommandInterpreter;
+import net.dpml.console.Console;
+import net.dpml.console.ConsoleCommand;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+import org.osgi.service.log.LogService;
+
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
-
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Dictionary;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;

-import net.dpml.activity.Disposable;
-
-import net.dpml.composition.model.ContainmentModel;
-
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.ConfigurationException;
-
-import net.dpml.console.CommandConnection;
-import net.dpml.console.CommandConnectionListener;
-import net.dpml.console.CommandConnectionProvider;
-import net.dpml.console.CommandInterpreter;
-import net.dpml.console.Console;
-import net.dpml.console.ConsoleCommand;
-
-import net.dpml.context.Context;
-import net.dpml.context.ContextException;
-
-import net.dpml.logging.Logger;
-
-import net.dpml.parameters.ParameterException;
-import net.dpml.parameters.Parameters;
-
-import net.dpml.service.ServiceException;
-import net.dpml.service.ServiceManager;
-
-/** This is the main component for the Console facility.
- *
- * <p>Parameters, default values are shown below.</p>
- * <pre>
- * &lt;parameters&gt;
- * &lt;parameter name="welcome-text" value="type 'help' form more info."
/&gt;
- * &lt;/parameters&gt;
- * </pre>
- * @metro.component name="console-impl" lifestyle="singleton"
- * @metro.service type="net.dpml.console.Console"
+/**
*/
public class ConsoleImpl
- implements Console, CommandConnectionListener, Disposable
+ implements Console, CommandConnectionListener, ManagedService
{
- private Hashtable m_Commands;
+ private LogService m_Logger;
private ArrayList m_Interpreters;
- private String m_Welcome;
- private ContainmentModel m_RootModel;
- private CommandConnectionProvider m_ConnectionProvider;
+ private Hashtable m_Commands;
private HashMap m_Connections;
- private Logger m_Logger;
-
+ private String m_Welcome;
+
+ private CommandConnectionProvider m_ConnectionProvider;
+ private CommandInterpreterImpl m_Interpreter;
+
/**
- * @param ctx the supplied listener context
- * @metro.entry key="urn:composition:containment.model"
- * type="net.dpml.composition.model.ContainmentModel"
- * @metro.dependency type="net.dpml.console.CommandConnectionProvider"
- * key="connection-provider"
*/
- public ConsoleImpl( Logger logger, Context ctx, Parameters params,
ServiceManager man )
- throws ContextException, ServiceException
+ public ConsoleImpl()
{
- m_Logger = logger;
- m_RootModel = (ContainmentModel) ctx.get(
"urn:composition:containment.model" );
- m_Welcome = params.getParameter( "welcome-text", "type 'help' form
more info." );
m_Interpreters = new ArrayList();
+ m_Connections = new HashMap();
m_Commands = new Hashtable();
- m_ConnectionProvider = (CommandConnectionProvider) man.lookup(
"connection-provider" );
- m_ConnectionProvider.addCommandConnectionListener( this );
}
-
+
+
+ public void updated( Dictionary dictionary )
+ throws ConfigurationException
+ {
+ if( dictionary == null )
+ {
+ m_Welcome = "Welcome to the DPML Console.\nAfter login, type\n\n
help[enter]\n\nfor list of commands";
+ }
+ else
+ m_Welcome = (String) dictionary.get( "welcomeText" );
+ }
+
public void dispose()
{
- m_ConnectionProvider.removeCommandConnectionListener( this );
+ getConnectionProvider().removeCommandConnectionListener( this );
Iterator list = m_Interpreters.iterator();
while( list.hasNext() )
{
@@ -102,7 +80,7 @@
intp.close();
}
}
-
+
public void connected( CommandConnection connection )
{
String name = connection.getUser();
@@ -114,19 +92,12 @@

synchronized( m_Connections )
{
- CommandInterpreter intp = new CommandInterpreterImpl(
- m_Logger,
- name,
- input,
- output,
- m_Commands,
- m_RootModel
- );
- m_Connections.put( connection, intp );
+ m_Interpreter = new CommandInterpreterImpl( name, input,
output );
+ m_Connections.put( connection, m_Interpreter );
}
} catch( IOException e )
{
- m_Logger.warn( "Unable to establish connection: " + name +
"\nAborting," , e );
+ getLogger().log( LogService.LOG_ERROR, e.getMessage(), e );
}
}

@@ -141,7 +112,6 @@

public void addCommand( ConsoleCommand cmd )
{
- m_Logger.info( "Added " + cmd.getName() + " command." );
String name = cmd.getName();
m_Commands.put( name, cmd );
synchronized( m_Interpreters )
@@ -199,13 +169,44 @@
try
{
output.newLine();
+ output.write( "Connection detected from " + name );
+ output.newLine();
+ output.newLine();
output.write( m_Welcome );
output.newLine();
output.flush();
} catch( IOException e )
{
- m_Logger.warn( "Could not send Welcome message to " + name +
"\nAborting the connection.", e );
throw e;
}
}
+
+ public CommandConnectionProvider getConnectionProvider()
+ {
+ return m_ConnectionProvider;
+ }
+
+ public void setConnectionProvider( CommandConnectionProvider
connectionProvider )
+ {
+ m_ConnectionProvider = connectionProvider;
+ }
+
+ LogService getLogger()
+ {
+ return m_Logger;
+ }
+
+ void setLogger( LogService logger )
+ {
+ synchronized( m_Interpreters )
+ {
+ Iterator list = m_Interpreters.iterator();
+ while( list.hasNext() )
+ {
+ CommandInterpreterImpl intp = (CommandInterpreterImpl)
list.next();
+ intp.setLogger( logger );
+ }
+ }
+ m_Logger = logger;
+ }
}

Modified: development/laboratory/users/niclas/osgi/console/index.xml
==============================================================================
--- development/planet/components/console/index.xml (original)
+++ development/laboratory/users/niclas/osgi/console/index.xml Tue Jun 14
23:31:43 2005
@@ -17,8 +17,9 @@

<index key="dpml-console">

- <import uri="artifact:module:dpml/metro/dpml-metro#2798"/>
- <import
uri="artifact:module:dpml/planet/processing/dpml-processing#2810"/>
+ <import uri="artifact:module:dpml/metro/dpml-metro#SNAPSHOT"/>
+ <import uri="artifact:module:dpml/planet/processing/dpml-processing#2810"/>
+
<project file="module.xml">
<info>
<group>dpml/planet/console</group>
@@ -26,20 +27,18 @@
<type>module</type>
</info>
</project>
+
<project basedir="api">
<info>
<group>dpml/planet/console/api</group>
<name>dpml-console-api</name>
</info>
<dependencies>
- <include key="dpml-transit-main"/>
- <include key="dpml-logging-api"/>
- <include key="dpml-service-api"/>
- <include key="dpml-context-api"/>
- <include key="dpml-parameters-api"/>
- <include key="dpml-classic-impl"/>
+ <include key="dpml-transit-main"/>
+ <include key="dpml-composition-api"/>
</dependencies>
</project>
+
<project basedir="impl">
<info>
<group>dpml/planet/console/impl</group>
@@ -47,11 +46,14 @@
</info>
<dependencies>
<include key="dpml-console-api"/>
+ <include key="dpml-composition-api"/>
+ <include key="osgi"/>
</dependencies>
<plugins>
<include key="dpml-meta-tools"/>
</plugins>
</project>
+
<project basedir="xmpp">
<info>
<group>dpml/planet/console/xmpp</group>
@@ -60,11 +62,13 @@
<dependencies>
<include key="dpml-console-api"/>
<include key="smack"/>
+ <include key="osgi"/>
</dependencies>
<plugins>
<include key="dpml-meta-tools"/>
</plugins>
</project>
+
<project basedir="socket">
<info>
<group>dpml/planet/console/socket</group>
@@ -72,11 +76,13 @@
</info>
<dependencies>
<include key="dpml-console-api"/>
+ <include key="osgi"/>
</dependencies>
<plugins>
<include key="dpml-meta-tools"/>
</plugins>
</project>
+
<project basedir="commands">
<info>
<group>dpml/planet/console/commands</group>
@@ -84,21 +90,7 @@
</info>
<dependencies>
<include key="dpml-console-impl"/>
- <include key="dpml-classic-api"/>
- <include key="dpml-classic-unit"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
- <project basedir="blocks/default">
- <info>
- <group>dpml/planet/console</group>
- <name>dpml-console-default</name>
- <type>block</type>
- </info>
- <dependencies>
- <include key="dpml-console-commands"/>
+ <include key="dpml-composition-api"/>
</dependencies>
<plugins>
<include key="dpml-meta-tools"/>
@@ -122,4 +114,12 @@
<version>1.5.0</version>
</info>
</resource>
+
+ <resource>
+ <info>
+ <name>osgi</name>
+ <group>osgi</group>
+ <version>3.0</version>
+ </info>
+ </resource>
</index>

Modified: development/laboratory/users/niclas/osgi/console/module.xml
==============================================================================
--- development/planet/components/console/module.xml (original)
+++ development/laboratory/users/niclas/osgi/console/module.xml Tue Jun 14
23:31:43 2005
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>

<project name="dpml-console" default="docs" basedir="."
- xmlns:transit="antlib:net.dpml.transit"
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >

<transit:import uri="artifact:template:dpml/magic/standard"/>

Modified:
development/laboratory/users/niclas/osgi/console/socket/src/main/net/dpml/console/socket/SocketCommandConnection.java
==============================================================================
---
development/planet/components/console/socket/src/main/net/dpml/console/socket/SocketCommandConnection.java
(original)
+++
development/laboratory/users/niclas/osgi/console/socket/src/main/net/dpml/console/socket/SocketCommandConnection.java
Tue Jun 14 23:31:43 2005
@@ -15,29 +15,27 @@
*/
package net.dpml.console.socket;

+import net.dpml.console.CommandConnection;
+import org.osgi.service.log.LogService;
+
import java.io.BufferedReader;
import java.io.BufferedWriter;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
-import java.io.IOException;
-
import java.net.Socket;

-import net.dpml.logging.Logger;
-
-import net.dpml.console.CommandConnection;
-
public class SocketCommandConnection
implements CommandConnection
{
private Socket m_Socket;
private BufferedReader m_Input;
private BufferedWriter m_Output;
- private Logger m_Logger;
+ private LogService m_Logger;

- SocketCommandConnection( Logger logger, Socket socket )
+ SocketCommandConnection( LogService logger, Socket socket )
throws IOException
{
m_Socket = socket;
@@ -78,14 +76,14 @@
m_Input.close();
} catch( IOException e )
{
- m_Logger.warn( "Unable to close Reader: " + m_Input, e );
+ m_Logger.log( LogService.LOG_WARNING, "Unable to close Reader: "
+ m_Input, e );
}
try
{
m_Output.close();
} catch( IOException e )
{
- m_Logger.warn( "Unable to close Writer: " + m_Output, e );
+ m_Logger.log( LogService.LOG_WARNING, "Unable to close Writer: "
+ m_Output, e );
}
try
{
@@ -95,7 +93,7 @@
}
} catch( IOException e )
{
- m_Logger.warn( "Unable to close Socket: " + m_Socket, e );
+ m_Logger.log( LogService.LOG_WARNING, "Unable to close Socket: "
+ m_Socket, e );
}
}

@@ -107,7 +105,7 @@
m_Output.newLine();
} catch( IOException e )
{
- m_Logger.warn( "[busy]: Can not write to connection: " +
m_Socket, e );
+ m_Logger.log( LogService.LOG_WARNING, "[busy]: Can not write to
connection: " + m_Socket, e );
}
}

@@ -119,7 +117,7 @@
m_Output.newLine();
} catch( IOException e )
{
- m_Logger.warn( "[available]: Can not write to connection: " +
m_Socket, e );
+ m_Logger.log( LogService.LOG_WARNING, "[available]: Can not
write to connection: " + m_Socket, e );
}
}
}

Modified:
development/laboratory/users/niclas/osgi/console/socket/src/main/net/dpml/console/socket/SocketProvider.java
==============================================================================
---
development/planet/components/console/socket/src/main/net/dpml/console/socket/SocketProvider.java
(original)
+++
development/laboratory/users/niclas/osgi/console/socket/src/main/net/dpml/console/socket/SocketProvider.java
Tue Jun 14 23:31:43 2005
@@ -15,146 +15,43 @@
*/
package net.dpml.console.socket;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
+import net.dpml.console.CommandConnection;
+import net.dpml.console.CommandConnectionListener;
+import net.dpml.console.CommandConnectionProvider;
+import org.osgi.service.log.LogService;

+import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
-import java.net.UnknownHostException;
-
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.Iterator;

-import net.dpml.activity.Startable;
-
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.ConfigurationException;
-
-import net.dpml.console.CommandConnection;
-import net.dpml.console.CommandConnectionListener;
-import net.dpml.console.CommandConnectionProvider;
-
-import net.dpml.logging.Logger;
-
-import net.dpml.parameters.ParameterException;
-import net.dpml.parameters.Parameters;
-
/** Server Socket provider.
*
-* <p>Parameters, default values are shown below.</p>
-* <pre>
-* &lt;parameters&gt;
-* &lt;parameter name="port" value="3333" /&gt;
-* &lt;parameter name="allow-deny" value="false" /&gt;
-* &lt;parameter name="local-allow" value="true" /&gt;
-* &lt;parameter name="welcome-text" value="type 'help' form more info."
/&gt;
-* &lt;/parameters&gt;
-* </pre>
-* <p> If <i>allow-deny</i> is set to true, then the connection is allowed
-* if the host does not exist in the deny list, otherwise it is not allowed
-* unless the host exist in the allow list.
-* </p>
-* <p>If <i>local-allow</i> is true, the localhost/127.0.0.1 is added to the
-* allow list. This is default, so one can connect without further
parameterization
-* or configuration.</p>
-* <P>Configuration</P>
-* <pre>
-* &lt;configuration&gt;
-* &lt;connections&gt;
-* &lt;allow&gt;127.0.0.1&gt;
-* &lt;allow&gt;10.0.0.23&gt;
-* &lt;allow&gt;10.0.0.24&gt;
-* &lt;/connections&gt;
-* &lt;/configuration&gt;
-* </pre>
-* <p>or in some circumstances, one sets the <i>allow-deny</i> parameter to
-* true, and have a deny list in the configuration.</p>
-* <pre>
-* &lt;configuration&gt;
-* &lt;connections&gt;
-* &lt;deny&gt;211.24.132.24&gt;
-* &lt;deny&gt;211.24.132.29&gt;
-* &lt;/connections&gt;
-* &lt;/configuration&gt;
-* </pre>
-*
-*
-* @metro.component name="console-socket" lifestyle="singleton"
-* @metro.service type="net.dpml.console.CommandConnectionProvider"
*/
public class SocketProvider
- implements CommandConnectionProvider, Startable, Runnable
+ implements CommandConnectionProvider, Runnable
{
private ServerSocket m_ServerSocket;
private Thread m_Thread;
private int m_Port;

- private boolean m_Allow;
- private HashSet m_Allows;
- private HashSet m_Denies;
-
private ArrayList m_Listeners;
- private Logger m_Logger;
-
- /** Constructor for Metro.
- *
- * Configuration of the component by the container.
- *
- * <p>Configuration:</p>
- * <pre>
- * &lt;configuration&gt;
- * &lt;connections&gt;
- * &lt;allow&gt;127.0.0.1&gt;
- * &lt;allow&gt;10.0.0.23&gt;
- * &lt;allow&gt;10.0.0.24&gt;
- * &lt;/connections&gt;
- * &lt;/configuration&gt;
- * </pre>
- * <p>or in some circumstances, one sets the <i>allow-deny</i> parameter
to
- * true, and have a deny list in the configuration.</p>
- * <pre>
- * &lt;configuration&gt;
- * &lt;connections&gt;
- * &lt;deny&gt;211.24.132.24&gt;
- * &lt;deny&gt;211.24.132.29&gt;
- * &lt;/connections&gt;
- * &lt;/configuration&gt;
- * </pre>
- *
- */
- public SocketProvider( Logger logger, Parameters params, Configuration
conf )
- throws ParameterException, ConfigurationException, IOException
+
+ private LogService m_Logger;
+
+ public SocketProvider( LogService logger, int port )
+ throws IOException
{
m_Logger = logger;
- m_Allow = params.getParameterAsBoolean( "deny-allow", false );
-
- boolean localAllow = params.getParameterAsBoolean( "allow-local",
true );
- if( localAllow )
- {
- try
- {
- InetAddress address = InetAddress.getByName( "127.0.0.1" );
- m_Allows.add( address );
- } catch( UnknownHostException e )
- {} // should not be possible, and if so, never mind.
- }
- Configuration child = conf.getChild( "connections" );
- configureConnections( child );
+ m_Port = port;
m_ServerSocket = new ServerSocket( m_Port );
m_Listeners = new ArrayList();
}

public void start()
{
- /* start new thread for monitoring and updating. */
- m_Logger.info( "Console started." );
m_Thread = new Thread( this );
m_Thread.start();
}
@@ -166,7 +63,9 @@
m_Thread.interrupt();
m_ServerSocket.close();
} catch( IOException e )
- {}
+ {
+ m_Logger.log( LogService.LOG_WARNING, e.getMessage(), e );
+ }
}

public void run()
@@ -185,15 +84,17 @@
running = false;
} catch( DeniedHostException e )
{
- m_Logger.warn( e.getMessage() );
+ m_Logger.log( LogService.LOG_INFO, e.getMessage(), e );
try
{
socket.close();
} catch( IOException ioe )
- {}
+ {
+ m_Logger.log( LogService.LOG_WARNING, ioe.getMessage(),
ioe );
+ }
} catch( Exception e )
{
- m_Logger.warn( "", e );
+ m_Logger.log( LogService.LOG_WARNING, e.getMessage(), e );
try
{
Thread.sleep( 60000 );
@@ -231,66 +132,19 @@
// TODO;
}

- private void configureConnections( Configuration conf )
- throws ConfigurationException
- {
- Configuration[] allows = conf.getChildren( "allow" );
- for( int i=0 ; i < allows.length ; i++ )
- configureAllow( allows[i] );
-
- Configuration[] denies = conf.getChildren( "deny" );
- for( int i=0 ; i < denies.length ; i++ )
- configureDeny( denies[i] );
- }
-
- private void configureAllow( Configuration allow )
- throws ConfigurationException
- {
- String address = allow.getValue();
- try
- {
- InetAddress allowAddr = InetAddress.getByName( address );
- m_Allows.add( allowAddr );
- } catch( UnknownHostException e )
- {
- throw new ConfigurationException( "Unknown host: " + address,
allow, e );
- }
- }
-
- private void configureDeny( Configuration deny )
- throws ConfigurationException
- {
- String address = deny.getValue();
- try
- {
- InetAddress denyAddr = InetAddress.getByName( address );
- m_Denies.add( denyAddr );
- } catch( UnknownHostException e )
- {
- throw new ConfigurationException( "Unknown host: " + address,
deny, e );
- }
- }
-
private void validateHost( InetAddress host )
throws DeniedHostException
{
- if( m_Allow )
- {
- if( m_Denies.contains( host ) )
- throw new DeniedHostException( host.toString() );
- }
- else
+ if( "127.0.0.1".equals( host.getHostName()) == false )
{
- if( ! m_Allows.contains( host ) )
- throw new DeniedHostException( host.toString() );
+ throw new DeniedHostException( "Only localhost is allowed at the
moment." );
}
}

private void fireConnection( Socket socket )
throws IOException
{
- Logger childLogger = m_Logger.getChildLogger( socket.toString() );
- CommandConnection cc = new SocketCommandConnection( childLogger,
socket );
+ CommandConnection cc = new SocketCommandConnection( m_Logger, socket
);
synchronized( m_Listeners )
{
Iterator list = m_Listeners.iterator();

Modified: development/laboratory/users/niclas/osgi/console/xmpp/build.xml
==============================================================================
--- development/planet/components/console/xmpp/build.xml (original)
+++ development/laboratory/users/niclas/osgi/console/xmpp/build.xml Tue
Jun 14 23:31:43 2005
@@ -17,7 +17,7 @@
-->

<project name="dpml-console-xmpp" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit" >
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">

<transit:import uri="artifact:template:dpml/magic/standard"/>


Modified:
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppCommandConnection.java
==============================================================================
---
development/planet/components/console/xmpp/src/main/net/dpml/console/xmpp/XmppCommandConnection.java
(original)
+++
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppCommandConnection.java
Tue Jun 14 23:31:43 2005
@@ -15,35 +15,26 @@
*/
package net.dpml.console.xmpp;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.IOException;
-
-import java.net.Socket;
-
-import net.dpml.logging.Logger;
-
import net.dpml.console.CommandConnection;
-
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.Presence;
+import org.osgi.service.log.LogService;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.IOException;

public class XmppCommandConnection
implements CommandConnection
{
- private Logger m_Logger;
+ private LogService m_Logger;
private BufferedReader m_Input;
private BufferedWriter m_Output;
private XMPPConnection m_Connection;
private String m_User;

- XmppCommandConnection( Logger logger, XMPPConnection connection, String
user )
- throws IOException
+ XmppCommandConnection( LogService logger, XMPPConnection connection,
String user )
{
m_Connection = connection;
m_User = user;
@@ -82,23 +73,20 @@
m_Input.close();
} catch( IOException e )
{
- m_Logger.warn( "Unable to close Reader: " + m_Input, e );
+ m_Logger.log( LogService.LOG_WARNING, "Unable to close Reader: "
+ m_Input, e );
}
try
{
m_Output.close();
} catch( IOException e )
{
- m_Logger.warn( "Unable to close Writer: " + m_Output, e );
+ m_Logger.log( LogService.LOG_WARNING, "Unable to close Writer: "
+ m_Output, e );
}
}

public void busy( String message )
{
- if( m_Logger.isDebugEnabled() )
- {
- m_Logger.debug( "busy: " + message );
- }
+ m_Logger.log( LogService.LOG_DEBUG, "busy: " + message );
Presence.Type type = Presence.Type.AVAILABLE;
Presence.Mode mode = Presence.Mode.DO_NOT_DISTURB;
Presence presence = new Presence( type, message, 0, mode );
@@ -107,10 +95,7 @@

public void available( String message )
{
- if( m_Logger.isDebugEnabled() )
- {
- m_Logger.debug( "available: " + message );
- }
+ m_Logger.log( LogService.LOG_DEBUG, "available: " + message );
Presence.Type type = Presence.Type.AVAILABLE;
Presence.Mode mode = Presence.Mode.AVAILABLE;
Presence presence = new Presence( type, message, 0, mode );

Modified:
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppProvider.java
==============================================================================
---
development/planet/components/console/xmpp/src/main/net/dpml/console/xmpp/XmppProvider.java
(original)
+++
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppProvider.java
Tue Jun 14 23:31:43 2005
@@ -15,68 +15,29 @@
*/
package net.dpml.console.xmpp;

-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import net.dpml.activity.Startable;
-
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.ConfigurationException;
-
import net.dpml.console.CommandConnection;
import net.dpml.console.CommandConnectionListener;
import net.dpml.console.CommandConnectionProvider;
-
-import net.dpml.logging.Logger;
-
-import net.dpml.parameters.ParameterException;
-import net.dpml.parameters.Parameters;
-
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
-
import org.jivesoftware.smack.filter.PacketFilter;
-
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Presence;
+import org.osgi.service.log.LogService;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;

/** Server Socket provider.
-*
-* <p>Parameters, with example values are shown below.</p>
-* <pre>
-* &lt;parameters&gt;
-* &lt;parameter name="jabber-server" value="jabber.dpml.net" /&gt;
-* &lt;parameter name="jabber-port" value="5222" /&gt;
-* &lt;parameter name="user" value="niclas" /&gt;
-* &lt;parameter name="password" value="NotThisOne" /&gt;
-* &lt;/parameters&gt;
-* </pre>
-*
-* @metro.component name="console-socket" lifestyle="singleton"
-* @metro.service type="net.dpml.console.CommandConnectionProvider"
*/
public class XmppProvider
implements CommandConnectionProvider, PacketListener
{
private ArrayList m_Listeners;
- private Logger m_Logger;
+ private LogService m_Logger;

private String m_Server;
private int m_Port;
@@ -89,15 +50,16 @@
/** Constructor for Metro.
*
*/
- public XmppProvider( Logger logger, Parameters params )
- throws ParameterException, IOException, XMPPException
+ public XmppProvider( LogService logger, String server, int port, String
user, String password )
+ throws XMPPException
{
m_Logger = logger;
m_Listeners = new ArrayList();
- m_Server = params.getParameter( "jabber-server" );
- m_Port = params.getParameterAsInteger( "jabber-port" );
- m_User = params.getParameter( "user",
InetAddress.getLocalHost().toString() );
- m_Password = params.getParameter( "password" );
+ m_ConnectedUsers = new HashMap();
+ m_Server = server;
+ m_Port = port;
+ m_User = user;
+ m_Password = password;
connectToJabberServer();
}

@@ -163,21 +125,15 @@
{
String tCommand = message.getBody();
String user = message.getFrom();
- try
+ synchronized( m_ConnectedUsers )
{
- synchronized( m_ConnectedUsers )
+ XmppCommandConnection cc = (XmppCommandConnection)
m_ConnectedUsers.get( user );
+ if( cc == null )
{
- XmppCommandConnection cc = (XmppCommandConnection)
m_ConnectedUsers.get( user );
- if( cc == null )
- {
- cc = fireConnection( user );
- m_ConnectedUsers.put( user, cc );
- } // else the connection has already been established, and
the
- // XmppReader is listening in on the Chat instead.
- }
- } catch( IOException e )
- {
- m_Logger.warn( "Unable to communicate with user: " + user, e );
+ cc = fireConnection( user );
+ m_ConnectedUsers.put( user, cc );
+ } // else the connection has already been established, and the
+ // XmppReader is listening in on the Chat instead.
}
}

@@ -193,10 +149,8 @@
}

private XmppCommandConnection fireConnection( String user )
- throws IOException
{
- Logger childLogger = m_Logger.getChildLogger( user );
- XmppCommandConnection cc = new XmppCommandConnection( childLogger,
m_Connection, user );
+ XmppCommandConnection cc = new XmppCommandConnection( m_Logger,
m_Connection, user );

synchronized( m_Listeners )
{

Modified:
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppReader.java
==============================================================================
---
development/planet/components/console/xmpp/src/main/net/dpml/console/xmpp/XmppReader.java
(original)
+++
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppReader.java
Tue Jun 14 23:31:43 2005
@@ -15,14 +15,13 @@
*/
package net.dpml.console.xmpp;

-import java.io.Reader;
-
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.PacketListener;
-
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;

+import java.io.Reader;
+
public class XmppReader extends Reader
implements PacketListener
{

Modified:
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppWriter.java
==============================================================================
---
development/planet/components/console/xmpp/src/main/net/dpml/console/xmpp/XmppWriter.java
(original)
+++
development/laboratory/users/niclas/osgi/console/xmpp/src/main/net/dpml/console/xmpp/XmppWriter.java
Tue Jun 14 23:31:43 2005
@@ -15,12 +15,12 @@
*/
package net.dpml.console.xmpp;

-import java.io.IOException;
-import java.io.Writer;
-
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.XMPPException;

+import java.io.IOException;
+import java.io.Writer;
+
public class XmppWriter extends Writer
{
private Chat m_Chat;



  • svn commit: r2861 - in development/laboratory/users/niclas/osgi/console: . api/src/main/net/dpml/console commands commands/src/main/net/dpml/console/commands commands/src/main/net/dpml/console/commands/bundle commands/src/test/net/dpml/console/test impl impl/src/main/net/dpml/console/impl socket/src/main/net/dpml/console/socket xmpp xmpp/src/main/net/dpml/console/xmpp, niclas, 06/14/2005

Archive powered by MHonArc 2.6.24.

Top of Page