org.ops4j.peaberry
Interface Import<T>

All Known Subinterfaces:
Export<T>
All Known Implementing Classes:
AbstractServiceImport, DelegatingImport, SimpleExport, StaticImport

public interface Import<T>

Handle to a service instance imported from a ServiceRegistry.

Author:
mcculls@gmail.com (Stuart McCulloch)

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.
 

Method Detail

get

T get()
Start using the imported service instance.

Returns:
service instance
Throws:
ServiceUnavailableException - if the service is unavailable

attributes

Map<String,?> attributes()
Get the attributes associated with the service.

Returns:
current attribute map

unget

void unget()
Stop using the imported service instance.


available

boolean available()
Is the service instance available?

Returns:
true if the service is available, otherwise false
Since:
1.1


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.