|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.tool.locator.Locator
public class Locator
Implementation of the locator pattern. A locator provides access to services which can be started and stopped. A default locator is available trough a singleton.
| Constructor Summary | |
|---|---|
Locator()
|
|
| Method Summary | ||
|---|---|---|
void |
addService(Service service)
Registers a new service. |
|
static Locator |
getDefault()
Returns a default locator (singleton). |
|
Service |
getService(String identifier)
Retrieves a specific service. |
|
|
getService(String identifier,
Class<T> type)
Retrieves a specific service a casts it to the provided class type. |
|
List<Service> |
getServices()
Returns all registered services. |
|
GestureDevice<?,?> |
getSharedDevice(String identifier)
|
|
void |
removeService(Service service)
Removes a service based on its unique identifier. |
|
void |
setSharedDevice(String identifier,
GestureDevice<?,?> device)
|
|
void |
startAll()
Starts all registered services. |
|
void |
stopAll()
Stops all registered services. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Locator()
| Method Detail |
|---|
public void addService(Service service)
service - the service to be registered.public Service getService(String identifier)
identifier - the identifier of the service to be retrieved.
public <T> T getService(String identifier,
Class<T> type)
identifier - the identifier of the service to be retrieved.type - the class type the returned service should be automatically
casted to.
public List<Service> getServices()
public void removeService(Service service)
service - the service to be removed.public void startAll()
public void stopAll()
public static Locator getDefault()
public void setSharedDevice(String identifier,
GestureDevice<?,?> device)
public GestureDevice<?,?> getSharedDevice(String identifier)
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||