You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2010/08/06 20:17:40 UTC
svn commit: r983083 - in
/felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp:
DeploymentPackageInstaller.java LogWrapper.java
Author: cziegeler
Date: Fri Aug 6 18:17:40 2010
New Revision: 983083
URL: http://svn.apache.org/viewvc?rev=983083&view=rev
Log:
Initial version of deployment package support for FileInstall
Modified:
felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/DeploymentPackageInstaller.java
felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/LogWrapper.java
Modified: felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/DeploymentPackageInstaller.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/DeploymentPackageInstaller.java?rev=983083&r1=983082&r2=983083&view=diff
==============================================================================
--- felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/DeploymentPackageInstaller.java (original)
+++ felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/DeploymentPackageInstaller.java Fri Aug 6 18:17:40 2010
@@ -31,7 +31,6 @@ import org.osgi.service.deploymentadmin.
* This is an extension for FileInstall.
* It listens for files ending with ".dp" and installs them through
* the deployment package admin.
- *
*/
public class DeploymentPackageInstaller implements ArtifactInstaller {
Modified: felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/LogWrapper.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/LogWrapper.java?rev=983083&r1=983082&r2=983083&view=diff
==============================================================================
--- felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/LogWrapper.java (original)
+++ felix/sandbox/cziegeler/dp-fileinstall/src/main/java/org/apache/felix/fileinstall/dp/LogWrapper.java Fri Aug 6 18:17:40 2010
@@ -32,7 +32,7 @@ import org.osgi.framework.ServiceReferen
/**
* This class mimics the standard OSGi <tt>LogService</tt> interface. An
- * instance of this class will be used by the EventAdmin for all logging. The
+ * instance of this class will be used by the DeploymentPackageInstaller for all logging. The
* implementation of this class sends log messages to standard output, if no
* <tt>LogService</tt> is present; it uses a log service if one is
* installed in the framework. To do that without creating a hard dependency on the
@@ -41,15 +41,14 @@ import org.osgi.framework.ServiceReferen
* use it if the listener is informed about an available service. By using a
* DynamicImport-Package dependency we don't need the package but
* use it if present. Additionally, all log methods prefix the log message with
- * <tt>EventAdmin: </tt>.
+ * <tt>DeploymentPackageInstaller: </tt>.
+ *
+ * This class is copied from the Apache Felix EventAdmin implementation.
*
* @see org.osgi.service.log.LogService
*
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
**/
-// TODO: At the moment we log a message to all currently available LogServices.
-// Maybe, we should only log to the one with the highest ranking instead?
-// What is the best practice in this case?
public class LogWrapper
{
/**
@@ -220,7 +219,7 @@ public class LogWrapper
/**
* Log a message with the given log level. Note that this will prefix the message
- * with <tt>EventAdmin: </tt>.
+ * with <tt>DeploymentPackageInstaller: </tt>.
*
* @param level The log level with which to log the msg.
* @param msg The message to log.
@@ -230,7 +229,7 @@ public class LogWrapper
// The method will remove any unregistered service reference as well.
synchronized(m_loggerRefs)
{
- final String logMsg = "EventAdmin: " + msg;
+ final String logMsg = "DeploymentPackageInstaller: " + msg;
if (!m_loggerRefs.isEmpty())
{
@@ -266,7 +265,7 @@ public class LogWrapper
/**
* Log a message with the given log level and the associated exception. Note that
- * this will prefix the message with <tt>EventAdmin: </tt>.
+ * this will prefix the message with <tt>DeploymentPackageInstaller: </tt>.
*
* @param level The log level with which to log the msg.
* @param msg The message to log.
@@ -277,7 +276,7 @@ public class LogWrapper
// The method will remove any unregistered service reference as well.
synchronized(m_loggerRefs)
{
- final String logMsg = "EventAdmin: " + msg;
+ final String logMsg = "DeploymentPackageInstaller: " + msg;
if (!m_loggerRefs.isEmpty())
{
@@ -313,7 +312,7 @@ public class LogWrapper
/**
* Log a message with the given log level together with the associated service
- * reference. Note that this will prefix the message with <tt>EventAdmin: </tt>.
+ * reference. Note that this will prefix the message with <tt>DeploymentPackageInstaller: </tt>.
*
* @param sr The reference of the service associated with this message.
* @param level The log level with which to log the msg.
@@ -324,7 +323,7 @@ public class LogWrapper
// The method will remove any unregistered service reference as well.
synchronized(m_loggerRefs)
{
- final String logMsg = "EventAdmin: " + msg;
+ final String logMsg = "DeploymentPackageInstaller: " + msg;
if (!m_loggerRefs.isEmpty())
{
@@ -360,7 +359,7 @@ public class LogWrapper
/**
* Log a message with the given log level, the associated service reference and
- * exception. Note that this will prefix the message with <tt>EventAdmin: </tt>.
+ * exception. Note that this will prefix the message with <tt>DeploymentPackageInstaller: </tt>.
*
* @param sr The reference of the service associated with this message.
* @param level The log level with which to log the msg.
@@ -373,7 +372,7 @@ public class LogWrapper
// The method will remove any unregistered service reference as well.
synchronized(m_loggerRefs)
{
- final String logMsg = "EventAdmin: " + msg;
+ final String logMsg = "DeploymentPackageInstaller: " + msg;
if (!m_loggerRefs.isEmpty())
{