Package org.glassfish.comms.api.datacentric

Examples of org.glassfish.comms.api.datacentric.DataCentricUtil


     *
     * @return the server instance where the CLB is presently routing the id
     *
     */
    public static String getCurrentServerInstance(String sasId) {
  DataCentricUtil dcu = DataCentricUtilHolder.getInstance();
  String instance;
  String key = SipApplicationSessionUtil.getSipApplicationKey(sasId);
  if (dcu instanceof DataCentricUtilImpl)
      instance = ((DataCentricUtilImpl) dcu).getCLBServerInstance(key);
  else instance = dcu.getActualServerInstance(key);
  return instance;
    }
View Full Code Here


     *
     * @return true if the given SipApplicationSession id maps to the local
     * server instance; false otherwise
     */
    public static boolean isLocal(String sasId) {
        DataCentricUtil dcu = DataCentricUtilHolder.getInstance();
        if (dcu instanceof DataCentricUtilImpl) {
            String s = ((DataCentricUtilImpl) dcu).getCLBServerInstance(SipApplicationSessionUtil.getSipApplicationKey(sasId));
            return ApplicationServer.getServerContext().getInstanceName().equals(s);
        }
        return dcu.isLocal(SipApplicationSessionUtil.getSipApplicationKey(sasId));
    }
View Full Code Here

TOP

Related Classes of org.glassfish.comms.api.datacentric.DataCentricUtil

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.