style tweaks.

fix-message-formatting
Danny van Heumen 11 years ago
parent 1e1ea2291a
commit 893e84b65d

@ -19,11 +19,12 @@
import org.osgi.framework.*; import org.osgi.framework.*;
/** /**
* Loads the IRC provider factory and registers its services in the OSGI * Loads the IRC provider factory and registers its services in the OSGI bundle
* bundle context. * context.
* *
* @author Stephane Remy * @author Stephane Remy
* @author Loic Kempf * @author Loic Kempf
* @author Danny van Heumen
*/ */
public class IrcActivator public class IrcActivator
implements BundleActivator implements BundleActivator
@ -31,8 +32,7 @@ public class IrcActivator
/** /**
* LOGGER instance. * LOGGER instance.
*/ */
private static final Logger logger private static final Logger LOGGER = Logger.getLogger(IrcActivator.class);
= Logger.getLogger(IrcActivator.class);
/** /**
* A reference to the IRC protocol provider factory. * A reference to the IRC protocol provider factory.
@ -76,7 +76,8 @@ public class IrcActivator
* listeners, unregister all services registered by this bundle, and * listeners, unregister all services registered by this bundle, and
* release all services used by this bundle. * release all services used by this bundle.
*/ */
public void start(BundleContext context) @Override
public void start(final BundleContext context)
throws Exception throws Exception
{ {
bundleContext = context; bundleContext = context;
@ -92,8 +93,10 @@ public void start(BundleContext context)
ircProviderFactory, ircProviderFactory,
hashtable); hashtable);
if (logger.isInfoEnabled()) if (LOGGER.isInfoEnabled())
logger.info("IRC protocol implementation [STARTED]."); {
LOGGER.info("IRC protocol implementation [STARTED].");
}
} }
/** /**
@ -117,11 +120,14 @@ public static ProtocolProviderFactoryIrcImpl getProtocolProviderFactory()
* listeners, unregister all services registered by the bundle, and * listeners, unregister all services registered by the bundle, and
* release all services used by the bundle. * release all services used by the bundle.
*/ */
public void stop(BundleContext context) @Override
public void stop(final BundleContext context)
throws Exception throws Exception
{ {
if (logger.isInfoEnabled()) if (LOGGER.isInfoEnabled())
logger.info("IRC protocol implementation [STOPPED]."); {
LOGGER.info("IRC protocol implementation [STOPPED].");
}
} }
/** /**
@ -132,13 +138,15 @@ public void stop(BundleContext context)
public static ResourceManagementService getResources() public static ResourceManagementService getResources()
{ {
if (resourceService == null) if (resourceService == null)
{
resourceService resourceService
= ResourceManagementServiceUtils.getService(bundleContext); = ResourceManagementServiceUtils.getService(bundleContext);
}
return resourceService; return resourceService;
} }
/** /**
* Bundle Context * Bundle Context.
* *
* @return returns bundle context * @return returns bundle context
*/ */
@ -165,7 +173,7 @@ public static MUCService getMUCService()
/** /**
* Return the UI service impl. * Return the UI service impl.
* *
* @return * @return returns UI Service instance
*/ */
public static UIService getUIService() public static UIService getUIService()
{ {
@ -183,15 +191,17 @@ public static UIService getUIService()
*/ */
public static CertificateService getCertificateService() public static CertificateService getCertificateService()
{ {
if(certiticateService == null) if (certiticateService == null)
{ {
ServiceReference guiVerifyReference ServiceReference<?> guiVerifyReference
= IrcActivator.getBundleContext().getServiceReference( = IrcActivator.getBundleContext().getServiceReference(
CertificateService.class.getName()); CertificateService.class.getName());
if(guiVerifyReference != null) if (guiVerifyReference != null)
{
certiticateService = (CertificateService) certiticateService = (CertificateService)
IrcActivator.getBundleContext().getService( IrcActivator.getBundleContext().getService(
guiVerifyReference); guiVerifyReference);
}
} }
return certiticateService; return certiticateService;
} }

Loading…
Cancel
Save