private void validateInput(String endpointName) { if (endpointName == null) { handleException("For proper clustered mode operation, " + "all endpoints should be uniquely named"); } }
private void validateInput(String endpointName) { if (endpointName == null) { handleException("For proper clustered mode operation, " + "all endpoints should be uniquely named"); } }
private List<Endpoint> getEndpoints(List<String> endpointNames, String root) { handleException("Invalid session - path cannot be null."); handleException("Invalid session. Endpoint with name '" + endpointName + "' cannot found");
private List<Endpoint> getEndpoints(List<String> endpointNames, String root) { handleException("Invalid session - path cannot be null."); handleException("Invalid session. Endpoint with name '" + endpointName + "' cannot found");
private void fillMap(List<Endpoint> endpoints, Map<String, Endpoint> endpointsMap) { if (endpoints != null) { for (Endpoint endpoint : endpoints) { String endpointName = getEndpointName(endpoint); if (endpointsMap.containsKey(endpointName)) { handleException("Endpoint Name with ' " + endpointName + "' already there. " + "Endpoint name must be unique."); } endpointsMap.put(endpointName, endpoint); fillMap(endpoint.getChildren(), endpointsMap); } } }
private void fillMap(List<Endpoint> endpoints, Map<String, Endpoint> endpointsMap) { if (endpoints != null) { for (Endpoint endpoint : endpoints) { String endpointName = getEndpointName(endpoint); if (endpointsMap.containsKey(endpointName)) { handleException("Endpoint Name with ' " + endpointName + "' already there. " + "Endpoint name must be unique."); } endpointsMap.put(endpointName, endpoint); fillMap(endpoint.getChildren(), endpointsMap); } } }
private String getEndpointName(Endpoint endpoint) { if (endpoint == null) { handleException("Endpoint cannot be null."); } assert endpoint != null; String endpointName = endpoint.getName(); if (endpointName == null && endpoint instanceof IndirectEndpoint) { endpointName = ((IndirectEndpoint) endpoint).getKey(); } validateInput(endpointName); return endpointName; }
private String getEndpointName(Endpoint endpoint) { if (endpoint == null) { handleException("Endpoint cannot be null."); } assert endpoint != null; String endpointName = endpoint.getName(); if (endpointName == null && endpoint instanceof IndirectEndpoint) { endpointName = ((IndirectEndpoint) endpoint).getKey(); } validateInput(endpointName); return endpointName; }
/** * Returns endpoint sequence related to the given session * * @param information Session information * @return endpoint sequence */ public List<Endpoint> getChildEndpoints(SessionInformation information) { List<Endpoint> endpoints; if (isClustered) { endpoints = getEndpoints(information.getPath(), information.getRootEndpointName()); } else { endpoints = information.getEndpointList(); } if (log.isDebugEnabled()) { log.debug("Retrieving endpoint sequence : " + endpoints + " for session " + information.getId()); } if (endpoints == null || endpoints.isEmpty()) { handleException("Session with id " + information.getId() + " is invalid ." + " A session must have a endpoint sequence associated with it"); } List<Endpoint> toBeSent = new ArrayList<Endpoint>(); toBeSent.addAll(endpoints); //remove the root as only expect children toBeSent.remove(0); return toBeSent; }
/** * Returns endpoint sequence related to the given session * * @param information Session information * @return endpoint sequence */ public List<Endpoint> getChildEndpoints(SessionInformation information) { List<Endpoint> endpoints; if (isClustered) { endpoints = getEndpoints(information.getPath(), information.getRootEndpointName()); } else { endpoints = information.getEndpointList(); } if (log.isDebugEnabled()) { log.debug("Retrieving endpoint sequence : " + endpoints + " for session " + information.getId()); } if (endpoints == null || endpoints.isEmpty()) { handleException("Session with id " + information.getId() + " is invalid ." + " A session must have a endpoint sequence associated with it"); } List<Endpoint> toBeSent = new ArrayList<Endpoint>(); toBeSent.addAll(endpoints); //remove the root as only expect children toBeSent.remove(0); return toBeSent; }
handleException("Invalid request to create sessions.");
handleException("Invalid request to create sessions . Cannot find a endpoint sequence.");
handleException("Invalid request to create sessions . Cannot find a endpoint sequence.");
handleException("Invalid request to create sessions . Cannot find a endpoint sequence.");
handleException("Invalid request to create sessions.");