livespace.osgi
Class SystemPropertyDependency
java.lang.Object
livespace.osgi.Dependency
livespace.osgi.SystemPropertyDependency
public class SystemPropertyDependency
- extends Dependency
A dependency on a system property.
Uses the system property value that was initially read and does not
repeatedly check for changes of the property value.
- Author:
- nguyenv3
Method Summary |
boolean |
isReady()
Checks the specified system property. |
void |
start()
Start the dependency looking for its required resources. |
void |
stop()
Stop the dependency looking for its required resources. |
Object |
value()
Convenience method to get the resource acquired by this
dependency. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
key
protected String key
notReadyValue
protected String notReadyValue
SystemPropertyDependency
public SystemPropertyDependency(String key,
String notReadyValue)
isReady
public boolean isReady()
- Checks the specified system property. If it is the same as the
not ready value, then that means the dependency is not ready
- Specified by:
isReady
in class Dependency
- See Also:
Dependency.isReady()
start
public void start()
throws Exception
- Description copied from class:
Dependency
- Start the dependency looking for its required resources. The
ready state will change when it is (which may be immediately as
part of this call).
- Specified by:
start
in class Dependency
- Throws:
Exception
stop
public void stop()
throws Exception
- Description copied from class:
Dependency
- Stop the dependency looking for its required resources. The ready
state may change, perhaps immediately as part of this call.
- Specified by:
stop
in class Dependency
- Throws:
Exception
value
public Object value()
throws UnsupportedOperationException
- Description copied from class:
Dependency
- Convenience method to get the resource acquired by this
dependency. Null if dependency is not ready.
- Specified by:
value
in class Dependency
- Throws:
UnsupportedOperationException
- if this call is not supported.
Copyright © 2008 Commonwealth of Australia