ch.ethz.iks.slp.impl
Interface PlatformAbstraction

All Known Implementing Classes:
OSGiPlatformAbstraction, StandalonePlatformAbstraction

public interface PlatformAbstraction

Platform abstraction interface. Used to hide the different implementations for the OSGi platform and for stand-alone Java.

Author:
Jan S. Rellermeyer, ETH Zurich.

Method Summary
 Filter createFilter(String filterString)
          Create an LDAP filter.
 boolean isDebugEnabled()
          Is debug enabled?
 boolean isErrorEnabled()
          Is error enabled?
 boolean isTraceEnabled()
          Is trace enabled?
 boolean isWarningEnabled()
          Is warning enabled?
 void logDebug(String message)
          Write a debug message to the log.
 void logDebug(String message, Throwable exception)
          Write a debug message to the log.
 void logError(String message)
          Write an error message to the log.
 void logError(String message, Throwable exception)
          Write an error message to the log.
 void logTrace(String message)
          Write a trace message to the log.
 void logTrace(String message, Throwable exception)
          Write a trace message to the log.
 void logWarning(String message)
          Write a warning message to the log.
 void logWarning(String message, Throwable exception)
          Write a warning message to the log.
 

Method Detail

isDebugEnabled

boolean isDebugEnabled()
Is debug enabled?

Returns:
true, if debug is enabled and a log implementation is available.

logDebug

void logDebug(String message)
Write a debug message to the log.

Parameters:
message - the message.

logDebug

void logDebug(String message,
              Throwable exception)
Write a debug message to the log.

Parameters:
message - the message.
exception - an exception.

isTraceEnabled

boolean isTraceEnabled()
Is trace enabled?

Returns:
true if trace is enabled and a log implementation is available.

logTrace

void logTrace(String message)
Write a trace message to the log.

Parameters:
message - the message.

logTrace

void logTrace(String message,
              Throwable exception)
Write a trace message to the log.

Parameters:
message - the message.
exception - an exception.

isWarningEnabled

boolean isWarningEnabled()
Is warning enabled?

Returns:
true if warning is enabled and a log implementation is available.

logWarning

void logWarning(String message)
Write a warning message to the log.

Parameters:
message - the message.

logWarning

void logWarning(String message,
                Throwable exception)
Write a warning message to the log.

Parameters:
message - the message.
exception - an exception.

isErrorEnabled

boolean isErrorEnabled()
Is error enabled?

Returns:
true if error is enabled and a log implementation is available.

logError

void logError(String message)
Write an error message to the log.

Parameters:
message - the message.

logError

void logError(String message,
              Throwable exception)
Write an error message to the log.

Parameters:
message - the message.
exception - an exception.

createFilter

Filter createFilter(String filterString)
Create an LDAP filter.

Parameters:
filterString - the filter string.
Returns:
an LDAP filter object.