public abstract class AbstractSessionObject extends Object implements SessionObject, EventBusAware
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSessionObject.Entry |
SessionObject.ClearedHandler, SessionObject.Scope| Modifier and Type | Field and Description |
|---|---|
protected Logger |
log |
protected Map<String,AbstractSessionObject.Entry> |
properties |
DOMAIN_NAME, NICKNAME, PASSWORD, RESOURCE, SERVER_NAME, USER_BARE_JID| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSessionObject() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClearedHandler(SessionObject.ClearedHandler handler) |
void |
clear()
Reset state.
|
void |
clear(SessionObject.Scope... scopes)
Reset state.
|
void |
clear(Set<SessionObject.Scope> scopes) |
EventBus |
getEventBus() |
<T> T |
getProperty(SessionObject.Scope scope,
String key) |
<T> T |
getProperty(String key)
Returns property
|
BareJID |
getUserBareJid()
Returns users JID
|
<T> T |
getUserProperty(String key)
Get user property.
|
void |
removeClearedHandler(SessionObject.ClearedHandler handler) |
void |
setEventBus(EventBus eventBus) |
SessionObject |
setProperty(SessionObject.Scope scope,
String key,
Object value)
Set property in given scope.
|
SessionObject |
setProperty(String key,
Object value)
Set property in session scope.
|
UserProperties |
setUserProperty(String key,
Object value)
Set user property.
|
String |
toString() |
protected final Logger log
protected Map<String,AbstractSessionObject.Entry> properties
public void addClearedHandler(SessionObject.ClearedHandler handler)
public void clear()
throws JaxmppException
clear in interface SessionObjectJaxmppExceptionpublic void clear(SessionObject.Scope... scopes) throws JaxmppException
clear in interface SessionObjectJaxmppExceptionpublic void clear(Set<SessionObject.Scope> scopes) throws JaxmppException
JaxmppExceptionpublic EventBus getEventBus()
public <T> T getProperty(SessionObject.Scope scope, String key)
public <T> T getProperty(String key)
getProperty in interface SessionObjectkey - property namepublic BareJID getUserBareJid()
getUserBareJid in interface SessionObjectpublic <T> T getUserProperty(String key)
getUserProperty in interface UserPropertieskey - property namenull if property isn't set.public void removeClearedHandler(SessionObject.ClearedHandler handler)
public void setEventBus(EventBus eventBus)
setEventBus in interface EventBusAwarepublic SessionObject setProperty(SessionObject.Scope scope, String key, Object value)
SessionObjectsetProperty in interface SessionObjectscope - scope of propertykey - property namevalue - property value. null to unset property.this SessionObjectpublic SessionObject setProperty(String key, Object value)
setProperty in interface SessionObjectkey - property namevalue - property value. null to unset property.this SessionObjectpublic UserProperties setUserProperty(String key, Object value)
setUserProperty in interface UserPropertieskey - property namevalue - property value. null to unset propertythis UserPropertiesCopyright © 2006–2015 Tigase. All rights reserved.