public void init(SynapseEnvironment synapseEnvironment) {
    this.synapseEnv = synapseEnvironment;

    if (endpoint != null) {
      endpoint.init(synapseEnvironment);
    }

    if (blocking) {
      try {
        configCtx =
            ConfigurationContextFactory.createConfigurationContextFromFileSystem(
                DEFAULT_CLIENT_REPO, DEFAULT_AXIS2_XML);
        blockingMsgSender = new BlockingMsgSender();
        blockingMsgSender.setConfigurationContext(configCtx);
        blockingMsgSender.init();

      } catch (AxisFault axisFault) {
        String msg = "Error while initializing the Call mediator";
        log.error(msg, axisFault);
        throw new SynapseException(msg, axisFault);
      }
    } else {
      synapseEnvironment.updateCallMediatorCount(true);
    }
  }
 public void destroy() {
   if (endpoint != null) {
     endpoint.destroy();
   }
   synapseEnv.updateCallMediatorCount(false);
 }