public class ClientInstance extends Object
| Modifier and Type | Method and Description |
|---|---|
static ClientInstance |
get() |
<T> T |
getComponent(Class<T> type)
Gets a global component instance.
|
Properties |
getProperties() |
String |
getProperty(String key) |
String |
getProperty(String key,
String defaultValue) |
long |
getStartTime() |
boolean |
hasProperty(String propName) |
<T> T |
removeComponent(Class<T> type)
Removes a global component instance.
|
<T> T |
setComponent(Class<T> type,
T component)
Registers a component instance with the client, so it may be reference globally.
|
Object |
setProperty(String key,
String value) |
public long getStartTime()
public Properties getProperties()
public boolean hasProperty(String propName)
propName - property namepublic <T> T getComponent(Class<T> type)
type - the class type of the component - requiredIllegalStateException - of the component isn't foundpublic <T> T removeComponent(Class<T> type)
type - the class type of the component - requiredpublic <T> T setComponent(Class<T> type, T component)
type - the class type of the component - requiredcomponent - the component instancepublic static ClientInstance get()
Copyright © 1999-2014 The Apache Software Foundation. All Rights Reserved.