Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.packetlogging
Class PacketLoggingActivator

java.lang.Object
  extended by net.java.sip.communicator.impl.packetlogging.PacketLoggingActivator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class PacketLoggingActivator
extends Object
implements org.osgi.framework.BundleActivator

Creates and registers Packet Logging service into OSGi. Also handles saving and retrieving configuration options for the service and is used from the configuration form.

Author:
Damian Minkov

Field Summary
(package private) static String LOGGING_DIR_NAME
          The name of the log dir.
 
Constructor Summary
PacketLoggingActivator()
           
 
Method Summary
static ConfigurationService getConfigurationService()
          Returns a reference to a ConfigurationService implementation currently registered in the bundle context or null if no such implementation was found.
static FileAccessService getFileAccessService()
          Returns the FileAccessService obtained from the bundle context.
 void start(org.osgi.framework.BundleContext bundleContext)
          Creates a PacketLoggingServiceImpl, starts it, and registers it as a PacketLoggingService.
 void stop(org.osgi.framework.BundleContext bundleContext)
          Stops the Packet Logging bundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGING_DIR_NAME

static final String LOGGING_DIR_NAME
The name of the log dir.

See Also:
Constant Field Values
Constructor Detail

PacketLoggingActivator

public PacketLoggingActivator()
Method Detail

start

public void start(org.osgi.framework.BundleContext bundleContext)
           throws Exception
Creates a PacketLoggingServiceImpl, starts it, and registers it as a PacketLoggingService.

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
bundleContext - OSGI bundle context
Throws:
Exception - if starting the PacketLoggingServiceImpl.

stop

public void stop(org.osgi.framework.BundleContext bundleContext)
          throws Exception
Stops the Packet Logging bundle

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
bundleContext - the OSGI bundle context
Throws:
Exception

getConfigurationService

public static ConfigurationService getConfigurationService()
Returns a reference to a ConfigurationService implementation currently registered in the bundle context or null if no such implementation was found.

Returns:
a currently valid implementation of the ConfigurationService.

getFileAccessService

public static FileAccessService getFileAccessService()
Returns the FileAccessService obtained from the bundle context.

Returns:
the FileAccessService obtained from the bundle context

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.