|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.osgi.util.OsgiStringUtils
public abstract class OsgiStringUtils
Utility class for creating nice string representations of various OSGi classes.
Field Summary | |
---|---|
static Constants |
BUNDLE_EVENTS
Constant over the Bundle events |
static Constants |
BUNDLE_STATES
Constant over the Bundle states |
static Constants |
FRAMEWORK_EVENTS
Constant over the Framework events |
static Constants |
SERVICE_EVENTS
Constant over the Service events |
Constructor Summary | |
---|---|
OsgiStringUtils()
|
Method Summary | |
---|---|
static String |
bundleStateAsString(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(Bundle bundle)
Returns the name of the given Bundle in a null-safe
manner. |
static String |
nullSafeNameAndSymName(Bundle bundle)
Returns the bundle name and symbolic name - useful when logging bundle info. |
static String |
nullSafeSymbolicName(Bundle bundle)
Returns the given Bundle symbolic name. |
static String |
nullSafeToString(BundleEvent event)
Returns a String representation for the given bundle event. |
static String |
nullSafeToString(FrameworkEvent event)
Returns a String representation for the given FrameworkEvent . |
static String |
nullSafeToString(ServiceEvent event)
Returns a String representation for the given ServiceEvent . |
static String |
nullSafeToString(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 |
---|
public static final Constants BUNDLE_EVENTS
public static final Constants FRAMEWORK_EVENTS
public static final Constants SERVICE_EVENTS
public static final Constants BUNDLE_STATES
Constructor Detail |
---|
public OsgiStringUtils()
Method Detail |
---|
public static String nullSafeBundleEventToString(int eventType)
eventType
- OSGi BundleEvent
given as an int
public static String nullSafeToString(BundleEvent event)
event
- OSGi BundleEvent
(can be null
)
public static String nullSafeToString(ServiceEvent event)
ServiceEvent
.
event
- OSGi ServiceEvent
(can be null
)
public static String nullSafeToString(FrameworkEvent event)
FrameworkEvent
.
event
- OSGi FrameworkEvent
(can be null
)
public static String nullSafeToString(ServiceReference reference)
ServiceReference
.
reference
- OSGi service reference (can be null
)
public static String bundleStateAsString(Bundle bundle)
Bundle
state.
bundle
- OSGi bundle (can be null
)
public static String nullSafeSymbolicName(Bundle bundle)
Bundle
symbolic name.
bundle
- OSGi bundle (can be null
)
public static String nullSafeName(Bundle bundle)
Bundle
in a null-safe
manner.
bundle
- OSGi bundle (can be null
)
public static String nullSafeNameAndSymName(Bundle bundle)
bundle
- OSGi bundle (can be null)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |