|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ops4j.peaberry.util.StaticImport<T>
public final class StaticImport<T>
An Import consisting of a fixed instance and optional attribute map.
| Constructor Summary | |
|---|---|
StaticImport(T instance)
Create a static Import for the given instance. |
|
StaticImport(T instance,
Map<String,?> attributes)
Create a static Import for the given instance and attribute map. |
|
| Method Summary | |
|---|---|
Map<String,?> |
attributes()
Get the attributes associated with the service. |
boolean |
available()
Is the service instance available? |
T |
get()
Start using the imported service instance. |
void |
unget()
Stop using the imported service instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaticImport(T instance)
Import for the given instance.
instance - service instance
public StaticImport(T instance,
Map<String,?> attributes)
Import for the given instance and attribute map.
instance - service instanceattributes - service attributes| Method Detail |
|---|
public T get()
Import
get in interface Import<T>public Map<String,?> attributes()
Import
attributes in interface Import<T>public void unget()
Import
unget in interface Import<T>public boolean available()
Import
available in interface Import<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||