Search in sources :

Example 6 with ClientSessionInfo

use of org.jivesoftware.openfire.session.ClientSessionInfo in project Openfire by igniterealtime.

the class RemoteClientSession method getActiveList.

public PrivacyList getActiveList() {
    Cache<String, ClientSessionInfo> cache = SessionManager.getInstance().getSessionInfoCache();
    ClientSessionInfo sessionInfo = cache.get(getAddress().toString());
    if (sessionInfo != null && sessionInfo.getActiveList() != null) {
        return PrivacyListManager.getInstance().getPrivacyList(address.getNode(), sessionInfo.getActiveList());
    }
    return null;
}
Also used : ClientSessionInfo(org.jivesoftware.openfire.session.ClientSessionInfo)

Example 7 with ClientSessionInfo

use of org.jivesoftware.openfire.session.ClientSessionInfo in project Openfire by igniterealtime.

the class RemoteClientSession method getPresence.

public Presence getPresence() {
    Cache<String, ClientSessionInfo> cache = SessionManager.getInstance().getSessionInfoCache();
    ClientSessionInfo sessionInfo = cache.get(getAddress().toString());
    if (sessionInfo != null) {
        return sessionInfo.getPresence();
    }
    // this can happen if a cluster node becomes unreachable
    return new Presence(Presence.Type.unavailable);
}
Also used : Presence(org.xmpp.packet.Presence) ClientSessionInfo(org.jivesoftware.openfire.session.ClientSessionInfo)

Example 8 with ClientSessionInfo

use of org.jivesoftware.openfire.session.ClientSessionInfo in project Openfire by igniterealtime.

the class RemoteClientSession method getDefaultList.

public PrivacyList getDefaultList() {
    Cache<String, ClientSessionInfo> cache = SessionManager.getInstance().getSessionInfoCache();
    ClientSessionInfo sessionInfo = cache.get(getAddress().toString());
    if (sessionInfo != null && sessionInfo.getDefaultList() != null) {
        return PrivacyListManager.getInstance().getPrivacyList(address.getNode(), sessionInfo.getDefaultList());
    }
    return null;
}
Also used : ClientSessionInfo(org.jivesoftware.openfire.session.ClientSessionInfo)

Example 9 with ClientSessionInfo

use of org.jivesoftware.openfire.session.ClientSessionInfo in project Openfire by igniterealtime.

the class RemoteClientSession method getPresence.

public Presence getPresence() {
    Cache<String, ClientSessionInfo> cache = SessionManager.getInstance().getSessionInfoCache();
    ClientSessionInfo sessionInfo = cache.get(getAddress().toString());
    if (sessionInfo != null) {
        return sessionInfo.getPresence();
    }
    return null;
}
Also used : ClientSessionInfo(org.jivesoftware.openfire.session.ClientSessionInfo)

Aggregations

ClientSessionInfo (org.jivesoftware.openfire.session.ClientSessionInfo)9 SessionEventDispatcher (org.jivesoftware.openfire.event.SessionEventDispatcher)1 Presence (org.xmpp.packet.Presence)1