@Override public void init(SynapseEnvironment synapseEnvironment) { if (!initialized) { super.init(synapseEnvironment); } this.env = synapseEnvironment; }
public void init(SynapseEnvironment synapseEnvironment) { if (!initialized) { super.init(synapseEnvironment); buildMessage = Boolean.parseBoolean( SynapsePropertiesLoader.getPropertyValue(SynapseConstants.BUILD_MESSAGE_ON_FAILOVER, "false")); } }
@Override public void init(SynapseEnvironment synapseEnvironment) { if (!initialized) { super.init(synapseEnvironment); } this.env = synapseEnvironment; this.setContentAware(true); }
@Override public void init(SynapseEnvironment synapseEnvironment) { super.init(synapseEnvironment); Template endpointTemplate = synapseEnvironment.getSynapseConfiguration(). getEndpointTemplate(template); if (endpointTemplate == null) { //if template is not already available we will warn the user //thus template endpoint will get initialized at runtime log.warn("Template " + template + " cannot be found for the endpoint " + getName()); return; } reLoadAndInitEndpoint(synapseEnvironment); }
@Override public void init(SynapseEnvironment synapseEnvironment) { super.init(synapseEnvironment); Template endpointTemplate = synapseEnvironment.getSynapseConfiguration(). getEndpointTemplate(template); if (endpointTemplate == null) { //if template is not already available we will warn the user //thus template endpoint will get initalized at runtime log.warn("Template " + template + " cannot be found for the endpoint " + getName()); return; } reLoadAndInitEndpoint(synapseEnvironment); }
@Override public void init(SynapseEnvironment synapseEnvironment) { ConfigurationContext cc = ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext(); if (!initialized) { super.init(synapseEnvironment); if (algorithmContext == null) { algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName()); } // if the loadbalancing algorithm implements the ManagedLifecycle interface // initlize the algorithm if (algorithm != null && algorithm instanceof ManagedLifecycle) { ManagedLifecycle lifecycle = (ManagedLifecycle) algorithm; lifecycle.init(synapseEnvironment); } } }
@Override public void init(SynapseEnvironment synapseEnvironment) { ConfigurationContext cc = ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext(); if (!initialized) { super.init(synapseEnvironment); if (algorithmContext == null) { algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName()); } // if the loadbalancing algorithm implements the ManagedLifecycle interface // initlize the algorithm if (algorithm != null && algorithm instanceof ManagedLifecycle) { ManagedLifecycle lifecycle = (ManagedLifecycle) algorithm; lifecycle.init(synapseEnvironment); } loadBalanceEPInitialized = true; buildMessage = Boolean.parseBoolean( SynapsePropertiesLoader.getPropertyValue(SynapseConstants.BUILD_MESSAGE_ON_FAILOVER, "false")); } }
/** * Creates a basic EndpointView with a given number of children added to the endpoint. * * @param numberOfChildren the child endpoints inside the endpoint attached to the end point view. If * specified as 0, the children list will be null * @return the created end point view */ private EndpointView createEndPointView(int numberOfChildren) { AbstractEndpoint endpoint = new AddressEndpoint(); MessageContext synCtx = new TestMessageContext(); synCtx.setConfiguration(new SynapseConfiguration()); SynapseEnvironment environment = new Axis2SynapseEnvironment( new ConfigurationContext(new AxisConfiguration()), synCtx.getConfiguration()); if (numberOfChildren > 0) { List<Endpoint> children = new ArrayList<>(numberOfChildren); for (int i = 0; i < numberOfChildren; i++) { AbstractEndpoint child = new AddressEndpoint(); child.init(environment); child.setEnableMBeanStats(true); child.setName("endpoint" + i); children.add(child); } endpoint.setChildren(children); } endpoint.init(environment); return new EndpointView("endpoint", endpoint); }