Service Activator Toolkit
Version 1.1.0 (20081206)

org.eclipse.soda.sat.core.util
Class MiscUtility

java.lang.Object
  extended by org.eclipse.soda.sat.core.util.MiscUtility

public class MiscUtility
extends Object

Miscellaneous utilities.


Method Summary
 boolean getBooleanProperty(String key, boolean defaultValue)
          Get the specified boolean property.
static MiscUtility getInstance()
          Public getter for the MiscUtility singleton instance.
 int getIntProperty(String key, int defaultValue)
          Get the specified int property.
 long getLongProperty(String key, long defaultValue)
          Get the specified long property.
 Object unwrapExportedServiceProxy(Object serviceProxy)
          Unwrap the specified exported service proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MiscUtility getInstance()
Public getter for the MiscUtility singleton instance.

Returns:
MiscUtility

getBooleanProperty

public boolean getBooleanProperty(String key,
                                  boolean defaultValue)
Get the specified boolean property.

Parameters:
key - A property key.
defaultValue - The default property value.
Returns:
The property value.

getIntProperty

public int getIntProperty(String key,
                          int defaultValue)
Get the specified int property.

Parameters:
key - A property key, never null.
defaultValue - The default property value.
Returns:
The property value.

getLongProperty

public long getLongProperty(String key,
                            long defaultValue)
Get the specified long property.

Parameters:
key - A property key, never null.
defaultValue - The default property value.
Returns:
The property value.

unwrapExportedServiceProxy

public Object unwrapExportedServiceProxy(Object serviceProxy)
                                  throws IllegalArgumentException
Unwrap the specified exported service proxy.

Parameters:
serviceProxy - A service proxy.
Returns:
The unwrapped service.
Throws:
IllegalArgumentException - is thrown if the parameter is not a Proxy, or if the parameters is not a proxy for an exported service.
See Also:
ExportProxyServiceRecord.unwrapProxy(Object)

Service Activator Toolkit
Version 1.1.0 (20081206)