Search in sources :

Example 11 with ClusterTask

use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.

the class RemoteSession method validate.

public boolean validate() {
    ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.validate);
    final Object clusterTaskResult = doSynchronousClusterTask(task);
    return clusterTaskResult == null ? false : (Boolean) clusterTaskResult;
}
Also used : ClusterTask(org.jivesoftware.util.cache.ClusterTask)

Example 12 with ClusterTask

use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.

the class RemoteSession method getHostName.

public String getHostName() throws UnknownHostException {
    if (hostName == null) {
        ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.getHostName);
        hostName = (String) doSynchronousClusterTask(task);
    }
    return hostName;
}
Also used : ClusterTask(org.jivesoftware.util.cache.ClusterTask)

Example 13 with ClusterTask

use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.

the class RemoteSession method getHostAddress.

public String getHostAddress() throws UnknownHostException {
    if (hostAddress == null) {
        ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.getHostAddress);
        hostAddress = (String) doSynchronousClusterTask(task);
    }
    return hostAddress;
}
Also used : ClusterTask(org.jivesoftware.util.cache.ClusterTask)

Example 14 with ClusterTask

use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.

the class RemoteOutgoingServerSession method isUsingServerDialback.

public boolean isUsingServerDialback() {
    if (usingServerDialback == -1) {
        ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.isUsingServerDialback);
        usingServerDialback = (Boolean) doSynchronousClusterTask(task) ? 1 : 0;
    }
    return usingServerDialback == 1;
}
Also used : ClusterTask(org.jivesoftware.util.cache.ClusterTask)

Example 15 with ClusterTask

use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.

the class RemoteSession method getCreationDate.

public Date getCreationDate() {
    // Get it once and cache it since it never changes
    if (creationDate == null) {
        ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.getCreationDate);
        creationDate = (Date) doSynchronousClusterTask(task);
    }
    return creationDate;
}
Also used : ClusterTask(org.jivesoftware.util.cache.ClusterTask)

Aggregations

ClusterTask (org.jivesoftware.util.cache.ClusterTask)21 Presence (org.xmpp.packet.Presence)2