You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2005/08/24 20:54:27 UTC
svn commit: r239730 -
/directory/sandbox/trunk/osgi-core/trunk/network/src/main/java/org/apache/mina/Activator.java
Author: erodriguez
Date: Wed Aug 24 11:54:21 2005
New Revision: 239730
URL: http://svn.apache.org/viewcvs?rev=239730&view=rev
Log:
Reformatting: imports, whitespace, line breaks, or code convention.
Modified:
directory/sandbox/trunk/osgi-core/trunk/network/src/main/java/org/apache/mina/Activator.java
Modified: directory/sandbox/trunk/osgi-core/trunk/network/src/main/java/org/apache/mina/Activator.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-core/trunk/network/src/main/java/org/apache/mina/Activator.java?rev=239730&r1=239729&r2=239730&view=diff
==============================================================================
--- directory/sandbox/trunk/osgi-core/trunk/network/src/main/java/org/apache/mina/Activator.java (original)
+++ directory/sandbox/trunk/osgi-core/trunk/network/src/main/java/org/apache/mina/Activator.java Wed Aug 24 11:54:21 2005
@@ -14,7 +14,6 @@
* limitations under the License.
*
*/
-
package org.apache.mina;
import java.io.IOException;
@@ -28,12 +27,11 @@
import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceRegistration;
-
public class Activator implements BundleActivator
{
private ServiceRegistry registry;
private ServiceRegistration registration;
-
+
/**
* Implements BundleActivator.start().
* Logs that this service is starting and starts this service.
@@ -42,20 +40,21 @@
public void start( BundleContext context ) throws BundleException
{
System.out.println( "Starting Apache MINA Service Registry." );
-
+
try
{
registry = new SimpleServiceRegistry();
}
- catch (IOException ioe)
- {
- throw new BundleException( "Failed to start MINA Service Registry." );
- }
-
+ catch ( IOException ioe )
+ {
+ throw new BundleException( "Failed to start MINA Service Registry." );
+ }
+
Dictionary parameters = new Hashtable();
- registration = context.registerService( ServiceRegistry.class.getName(), registry, parameters );
+ registration = context.registerService( ServiceRegistry.class.getName(), registry,
+ parameters );
}
-
+
/**
* Implements BundleActivator.stop().
* Logs that this service has stopped.
@@ -64,11 +63,10 @@
public void stop( BundleContext context )
{
System.out.println( "Stopping Apache MINA Service Registry." );
-
+
registration.unregister();
registration = null;
-
+
registry = null;
}
}
-