public abstract class OsgiStringUtils extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
OsgiStringUtils() |
Modifier and Type | Method and Description |
---|---|
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 . |
public static final org.springframework.core.Constants BUNDLE_EVENTS
public static final org.springframework.core.Constants FRAMEWORK_EVENTS
public static final org.springframework.core.Constants SERVICE_EVENTS
public static final org.springframework.core.Constants BUNDLE_STATES
public static String nullSafeBundleEventToString(int eventType)
eventType
- OSGi BundleEvent
given as an intpublic static String nullSafeToString(org.osgi.framework.BundleEvent event)
event
- OSGi BundleEvent
(can be null
)public static String nullSafeToString(org.osgi.framework.ServiceEvent event)
ServiceEvent
.event
- OSGi ServiceEvent
(can be null
)public static String nullSafeToString(org.osgi.framework.FrameworkEvent event)
FrameworkEvent
.event
- OSGi FrameworkEvent
(can be null
)public static String nullSafeToString(org.osgi.framework.ServiceReference reference)
ServiceReference
.reference
- OSGi service reference (can be null
)public static String bundleStateAsString(org.osgi.framework.Bundle bundle)
Bundle
state.bundle
- OSGi bundle (can be null
)public static String nullSafeSymbolicName(org.osgi.framework.Bundle bundle)
Bundle
symbolic name.bundle
- OSGi bundle (can be null
)public static String nullSafeName(org.osgi.framework.Bundle bundle)
Bundle
in a null-safe manner.bundle
- OSGi bundle (can be null
)public static String nullSafeNameAndSymName(org.osgi.framework.Bundle bundle)
bundle
- OSGi bundle (can be null)Copyright © 2006–2018. All rights reserved.