akka.osgi
Class DefaultOSGiLogger

java.lang.Object
  extended by akka.event.Logging.DefaultLogger
      extended by akka.osgi.DefaultOSGiLogger
All Implemented Interfaces:
Actor, Logging.StdOutLogger

public class DefaultOSGiLogger
extends Logging.DefaultLogger

Logger for OSGi environment. Stands for an interface between akka and the OSGi LogService It uses the OSGi LogService to log the received LogEvents


Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Constructor Summary
DefaultOSGiLogger()
           
 
Method Summary
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> initialisedReceive(org.osgi.service.log.LogService logService)
          Behaviour of the Eventhanlder that is setup (has received a LogService)
 void logMessage(org.osgi.service.log.LogService logService, Logging.LogEvent event)
          Logs a message in an OSGi LogService
 java.lang.String messageFormat()
           
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
          This defines the initial actor behavior, it must return a partial function with the actor logic.
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> uninitialisedReceive()
          Behaviour of the logger that waits for its LogService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, noSender, postRestart, postStop, preRestart, preStart, self, sender, supervisorStrategy, unhandled
 
Methods inherited from interface akka.event.Logging.StdOutLogger
date, dateFormat, debug, debugFormat, error, errorFormat, errorFormatWithoutCause, info, infoFormat, print, timestamp, warning, warningFormat
 

Constructor Detail

DefaultOSGiLogger

public DefaultOSGiLogger()
Method Detail

messageFormat

public java.lang.String messageFormat()

receive

public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface: Actor
This defines the initial actor behavior, it must return a partial function with the actor logic.

Specified by:
receive in interface Actor
Overrides:
receive in class Logging.DefaultLogger

uninitialisedReceive

public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> uninitialisedReceive()
Behaviour of the logger that waits for its LogService

Returns:
Receive: Store LogEvent or become initialised

initialisedReceive

public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> initialisedReceive(org.osgi.service.log.LogService logService)
Behaviour of the Eventhanlder that is setup (has received a LogService)

Parameters:
logService - registrered OSGi LogService
Returns:
Receive : Logs LogEvent or go back to the uninitialised state

logMessage

public void logMessage(org.osgi.service.log.LogService logService,
                       Logging.LogEvent event)
Logs a message in an OSGi LogService

Parameters:
logService - OSGi LogService registered and used for logging
event - akka LogEvent that is log unsing the LogService