use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.
the class RemoteClientSession method isInitialized.
public boolean isInitialized() {
if (initialized == -1) {
Presence presence = getPresence();
if (presence != null && presence.isAvailable()) {
// Optimization to avoid making a remote call
initialized = 1;
} else {
ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.isInitialized);
Object result = doSynchronousClusterTask(task);
initialized = result != null && (Boolean) result ? 1 : 0;
}
}
return initialized == 1;
}
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;
}
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;
}
use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.
the class RemoteSession method getNumClientPackets.
public long getNumClientPackets() {
ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.getNumClientPackets);
final Object clusterTaskResult = doSynchronousClusterTask(task);
return clusterTaskResult == null ? -1 : (Long) clusterTaskResult;
}
use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.
the class RemoteSession method isSecure.
public boolean isSecure() {
ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.isSecure);
final Object clusterTaskResult = doSynchronousClusterTask(task);
return clusterTaskResult == null ? false : (Boolean) clusterTaskResult;
}
Aggregations