Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.gemini.blueprint.util
Class OsgiStringUtils

    java.lang.Object
      org.eclipse.gemini.blueprint.util.OsgiStringUtils

    public abstract class OsgiStringUtils

extends Object

Utility class for creating nice string representations of various OSGi classes.

Author:
  Costin Leau

Field Summary
`static org.springframework.core.Constants` | `BUNDLE_EVENTS` Constant over the Bundle events
`static org.springframework.core.Constants` | `BUNDLE_STATES` Constant over the Bundle states
`static org.springframework.core.Constants` | `FRAMEWORK_EVENTS` Constant over the Framework events
`static org.springframework.core.Constants` | `SERVICE_EVENTS` Constant over the Service events

Constructor Summary
`OsgiStringUtils()`

Method Summary
`static String` | `bundleStateAsString(org.osgi.framework.Bundle bundle)` Returns a String representation of the `Bundle` state.
`static String` | `nullSafeBundleEventToString(int eventType)` Returns a String representation for the given bundle event.
`static String` | `nullSafeName(org.osgi.framework.Bundle bundle)` Returns the name of the given `Bundle` in a null-safe manner.
`static String` | `nullSafeNameAndSymName(org.osgi.framework.Bundle bundle)` Returns the bundle name and symbolic name - useful when logging bundle info.
`static String` | `nullSafeSymbolicName(org.osgi.framework.Bundle bundle)` Returns the given `Bundle` symbolic name.
`static String` | `nullSafeToString(org.osgi.framework.BundleEvent event)` Returns a String representation for the given bundle event.
`static String` | `nullSafeToString(org.osgi.framework.FrameworkEvent event)` Returns a String representation for the given `FrameworkEvent` .
`static String` | `nullSafeToString(org.osgi.framework.ServiceEvent event)` Returns a String representation for the given `ServiceEvent`.
`static String` | `nullSafeToString(org.osgi.framework.ServiceReference reference)` Returns a String representation of the given `ServiceReference`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BUNDLE_EVENTS

    public static final org.springframework.core.Constants BUNDLE_EVENTS

  Constant over the Bundle events

### FRAMEWORK_EVENTS

    public static final org.springframework.core.Constants FRAMEWORK_EVENTS

  Constant over the Framework events

### SERVICE_EVENTS

    public static final org.springframework.core.Constants SERVICE_EVENTS

  Constant over the Service events

### BUNDLE_STATES

    public static final org.springframework.core.Constants BUNDLE_STATES

  Constant over the Bundle states

Constructor Detail

### OsgiStringUtils

    public OsgiStringUtils()

Method Detail

### nullSafeBundleEventToString

    public static String nullSafeBundleEventToString(int eventType)

  Returns a String representation for the given bundle event.

  Parameters:
    `eventType` - OSGi `BundleEvent` given as an int
  Returns:
    String representation for the bundle event

### nullSafeToString

    public static String nullSafeToString(org.osgi.framework.BundleEvent event)

  Returns a String representation for the given bundle event.

  Parameters:
    `event` - OSGi `BundleEvent` (can be `null`)
  Returns:
    String representation for the given bundle event

### nullSafeToString

    public static String nullSafeToString(org.osgi.framework.ServiceEvent event)

  Returns a String representation for the given `ServiceEvent`.

  Parameters:
    `event` - OSGi `ServiceEvent` (can be `null`)
  Returns:
    String representation for the given event

### nullSafeToString

    public static String nullSafeToString(org.osgi.framework.FrameworkEvent event)

  Returns a String representation for the given `FrameworkEvent` .

  Parameters:
    `event` - OSGi `FrameworkEvent` (can be `null`)
  Returns:
    String representation of the given event

### nullSafeToString

    public static String nullSafeToString(org.osgi.framework.ServiceReference reference)

  Returns a String representation of the given `ServiceReference`.

  Parameters:
    `reference` - OSGi service reference (can be `null`)
  Returns:
    String representation of the given service reference

### bundleStateAsString

    public static String bundleStateAsString(org.osgi.framework.Bundle bundle)

  Returns a String representation of the `Bundle` state.

  Parameters:
    `bundle` - OSGi bundle (can be `null`)
  Returns:
    bundle state as a string

### nullSafeSymbolicName

    public static String nullSafeSymbolicName(org.osgi.framework.Bundle bundle)

  Returns the given `Bundle` symbolic name.

  Parameters:
    `bundle` - OSGi bundle (can be `null`)
  Returns:
    the bundle, symbolic name

### nullSafeName

    public static String nullSafeName(org.osgi.framework.Bundle bundle)

  Returns the name of the given `Bundle` in a null-safe manner.

  Parameters:
    `bundle` - OSGi bundle (can be `null`)
  Returns:
    bundle name

### nullSafeNameAndSymName

    public static String nullSafeNameAndSymName(org.osgi.framework.Bundle bundle)

  Returns the bundle name and symbolic name - useful when logging bundle info.

  Parameters:
    `bundle` - OSGi bundle (can be null)
  Returns:
    the bundle name and symbolic name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013. All Rights Reserved.