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);
initialized = (Boolean) doSynchronousClusterTask(task) ? 1 : 0;
}
}
return initialized == 1;
}
use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.
the class RemoteSession method getServerName.
public String getServerName() {
if (serverName == null) {
ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.getServerName);
serverName = (String) doSynchronousClusterTask(task);
}
return serverName;
}
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;
}
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;
}
use of org.jivesoftware.util.cache.ClusterTask in project Openfire by igniterealtime.
the class RemoteSession method getStreamID.
public StreamID getStreamID() {
// Get it once and cache it since it never changes
if (streamID == null) {
ClusterTask task = getRemoteSessionTask(RemoteSessionTask.Operation.getStreamID);
streamID = (StreamID) doSynchronousClusterTask(task);
}
return streamID;
}
Aggregations