/** * Returns a name associated with the ServiceGroupContext * associated with this ServiceContext. * * @return The name string, or null if no name can be found */ public String getGroupName() { if (serviceGroupContext != null) { return serviceGroupContext.getId(); } if (metaParent != null) { return metaParent.getId(); } return null; }
/** * Returns a name associated with the ServiceGroupContext * associated with this ServiceContext. * * @return The name string, or null if no name can be found */ public String getGroupName() { if (serviceGroupContext != null) { return serviceGroupContext.getId(); } if (metaParent != null) { return metaParent.getId(); } return null; }
String ctxid = ctx.getId();
public static StateClusteringCommand getRemoveCommand(AbstractContext abstractContext) { if (abstractContext instanceof ServiceGroupContext) { ServiceGroupContext sgCtx = (ServiceGroupContext) abstractContext; DeleteServiceGroupStateCommand cmd = new DeleteServiceGroupStateCommand(); cmd.setServiceGroupContextId(sgCtx.getId()); return cmd; } return null; }
public static StateClusteringCommand getRemoveCommand(AbstractContext abstractContext) { if (abstractContext instanceof ServiceGroupContext) { ServiceGroupContext sgCtx = (ServiceGroupContext) abstractContext; DeleteServiceGroupStateCommand cmd = new DeleteServiceGroupStateCommand(); cmd.setServiceGroupContextId(sgCtx.getId()); return cmd; } return null; }
/** * Removes the given ServiceGroup from the ServiceGroup context * * @param serviceGroup the AxisServiceGroup to remove */ public void removeServiceGroupContext(AxisServiceGroup serviceGroup) { if (serviceGroup == null) return; String groupName = serviceGroup.getServiceGroupName(); Object obj = applicationSessionServiceGroupContexts.get(groupName); if (obj != null) { applicationSessionServiceGroupContexts.remove(serviceGroup.getServiceGroupName()); return; } ArrayList<String> toBeRemovedList = new ArrayList<String>(); Iterator<ServiceGroupContext> serviceGroupContexts = serviceGroupContextMap.values().iterator(); while (serviceGroupContexts.hasNext()) { ServiceGroupContext serviceGroupContext =serviceGroupContexts.next(); if (serviceGroupContext.getDescription().equals(serviceGroup)) { toBeRemovedList.add(serviceGroupContext.getId()); } } for (Object aToBeRemovedList : toBeRemovedList) { String s = (String)aToBeRemovedList; serviceGroupContextMap.remove(s); } }
/** * Removes the given ServiceGroup from the ServiceGroup context * * @param serviceGroup the AxisServiceGroup to remove */ public void removeServiceGroupContext(AxisServiceGroup serviceGroup) { if (serviceGroup == null) return; String groupName = serviceGroup.getServiceGroupName(); Object obj = applicationSessionServiceGroupContexts.get(groupName); if (obj != null) { applicationSessionServiceGroupContexts.remove(serviceGroup.getServiceGroupName()); return; } ArrayList<String> toBeRemovedList = new ArrayList<String>(); Iterator<ServiceGroupContext> serviceGroupContexts = serviceGroupContextMap.values().iterator(); while (serviceGroupContexts.hasNext()) { ServiceGroupContext serviceGroupContext =serviceGroupContexts.next(); if (serviceGroupContext.getDescription().equals(serviceGroup)) { toBeRemovedList.add(serviceGroupContext.getId()); } } for (Object aToBeRemovedList : toBeRemovedList) { String s = (String)aToBeRemovedList; serviceGroupContextMap.remove(s); } }
String ctxid = ctx.getId();
/** * Adds the given ServiceGroupContext into the SOAP session table * * @param serviceGroupContext ServiceGroup Context to add */ public void addServiceGroupContextIntoSoapSessionTable( ServiceGroupContext serviceGroupContext) { String id = serviceGroupContext.getId(); serviceGroupContextMap.put(id, serviceGroupContext); serviceGroupContext.touch(); serviceGroupContext.setParent(this); // this is the best time to clean up the SGCtxts since are not being used anymore cleanupServiceGroupContexts(); }
/** * Adds the given ServiceGroupContext into the SOAP session table * * @param serviceGroupContext ServiceGroup Context to add */ public void addServiceGroupContextIntoSoapSessionTable( ServiceGroupContext serviceGroupContext) { String id = serviceGroupContext.getId(); serviceGroupContextMap.put(id, serviceGroupContext); serviceGroupContext.touch(); serviceGroupContext.setParent(this); // this is the best time to clean up the SGCtxts since are not being used anymore cleanupServiceGroupContexts(); }
private static UpdateStateCommand toUpdateContextCommand(AbstractContext context) { UpdateStateCommand cmd = null; if (context instanceof ConfigurationContext) { cmd = new UpdateConfigurationStateCommand(); } else if (context instanceof ServiceGroupContext) { ServiceGroupContext sgCtx = (ServiceGroupContext) context; cmd = new UpdateServiceGroupStateCommand(); UpdateServiceGroupStateCommand updateSgCmd = (UpdateServiceGroupStateCommand) cmd; updateSgCmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName()); updateSgCmd.setServiceGroupContextId(sgCtx.getId()); } else if (context instanceof ServiceContext) { ServiceContext serviceCtx = (ServiceContext) context; cmd = new UpdateServiceStateCommand(); UpdateServiceStateCommand updateServiceCmd = (UpdateServiceStateCommand) cmd; String sgName = serviceCtx.getServiceGroupContext().getDescription().getServiceGroupName(); updateServiceCmd.setServiceGroupName(sgName); updateServiceCmd.setServiceGroupContextId(serviceCtx.getServiceGroupContext().getId()); updateServiceCmd.setServiceName(serviceCtx.getAxisService().getName()); } return cmd; }
private static UpdateStateCommand toUpdateContextCommand(AbstractContext context) { UpdateStateCommand cmd = null; if (context instanceof ConfigurationContext) { cmd = new UpdateConfigurationStateCommand(); } else if (context instanceof ServiceGroupContext) { ServiceGroupContext sgCtx = (ServiceGroupContext) context; cmd = new UpdateServiceGroupStateCommand(); UpdateServiceGroupStateCommand updateSgCmd = (UpdateServiceGroupStateCommand) cmd; updateSgCmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName()); updateSgCmd.setServiceGroupContextId(sgCtx.getId()); } else if (context instanceof ServiceContext) { ServiceContext serviceCtx = (ServiceContext) context; cmd = new UpdateServiceStateCommand(); UpdateServiceStateCommand updateServiceCmd = (UpdateServiceStateCommand) cmd; String sgName = serviceCtx.getServiceGroupContext().getDescription().getServiceGroupName(); updateServiceCmd.setServiceGroupName(sgName); updateServiceCmd.setServiceGroupContextId(serviceCtx.getServiceGroupContext().getId()); updateServiceCmd.setServiceName(serviceCtx.getAxisService().getName()); } return cmd; }
((ServiceGroupContext) msgctx.getServiceContext().getParent()).getId());
((ServiceGroupContext) msgctx.getServiceContext().getParent()).getId());
String groupName = metaParent.getId();
String groupName = metaParent.getId();