Package org.apache.openmeetings.cluster.sync

Examples of org.apache.openmeetings.cluster.sync.RestClient


   * If there is no object yet, create one.
   *
   * @param server
   */
  private synchronized RestClient getRestClient(Server server) {
    RestClient restClient = restClientsSessionStore.get(server.getId());

    // check if any values of the server have been changed,
    // if yes, we need a new RestClient to make sure it will re-login to the
    // changed server details
    if (restClient != null && restClient.hasServerDetailsChanged(server)) {
      log.debug("Server details changed, get new rest client");
      restClient = null;
    }

    if (restClient == null) {
      restClient = new RestClient(server);
      restClientsSessionStore.put(server.getId(), restClient);
    }
    return restClient;
  }
View Full Code Here


   * @param serverId
   * @param publicSID
   */
  public void kickSlaveUser(Server server, String publicSID) throws Exception {
   
    RestClient rClient = getRestClient(server);
   
    if (rClient == null) {
      throw new Exception("No RestClient found for server " + server);
    }
   
    rClient.kickUser(publicSID);
   
  }
View Full Code Here

   * If there is no object yet, create one.
   *
   * @param server
   */
  private synchronized RestClient getRestClient(Server server) {
    RestClient restClient = restClientsSessionStore.get(server.getId());

    // check if any values of the server have been changed,
    // if yes, we need a new RestClient to make sure it will re-login to the
    // changed server details
    if (restClient != null && restClient.hasServerDetailsChanged(server)) {
      log.debug("Server details changed, get new rest client");
      restClient = null;
    }

    if (restClient == null) {
      restClient = new RestClient(server);
      restClientsSessionStore.put(server.getId(), restClient);
    }
    return restClient;
  }
View Full Code Here

   * @param serverId
   * @param publicSID
   */
  public void kickSlaveUser(Server server, String publicSID) throws Exception {
   
    RestClient rClient = getRestClient(server);
   
    if (rClient == null) {
      throw new Exception("No RestClient found for server " + server);
    }
   
    rClient.kickUser(publicSID);
   
  }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.cluster.sync.RestClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.