Package org.apache.uima.aae.jmx

Examples of org.apache.uima.aae.jmx.ServiceInfo


      {
        String key = (String) it.next();
        System.out.println("Controller:"+getName()+ " Disabling Delegate:"+key+" Due to Excessive Errors");
        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, getClass().getName(), "disableDelegates", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_removing_endpoint_from_map__INFO", new Object[] { getName(), key });
        //  Change state of the delegate
        ServiceInfo sf = getDelegateServiceInfo( key );
        if ( sf != null )
        {
          sf.setState("Disabled");
        }
        Endpoint endpoint = lookUpEndpoint(key, false);
        destinationMap.remove(key);
        disabledDelegateList.add(key);
        if ( endpoint != null &&
View Full Code Here


        remoteEndpoints[i].setController(this);
        String key = lookUpDelegateKey(remoteEndpoints[i].getEndpoint());
        Endpoint endpoint = ((Endpoint) destinationMap.get(key));
        if ( key != null && endpoint != null)
        {
          ServiceInfo serviceInfo = endpoint.getServiceInfo();
          PrimitiveServiceInfo pServiceInfo = new PrimitiveServiceInfo();
          pServiceInfo.setBrokerURL(serviceInfo.getBrokerURL());
          pServiceInfo.setInputQueueName(serviceInfo.getInputQueueName());
          pServiceInfo.setState(serviceInfo.getState());
          pServiceInfo.setAnalysisEngineInstanceCount(1);
         
          registerWithAgent(pServiceInfo, super.getManagementInterface().getJmxDomain()
              +super.jmxContext+",r"+remoteIndex+"="+key+" [Remote Uima EE Service],name="+key+"_"+serviceInfo.getLabel());

          ServicePerformance servicePerformance = new ServicePerformance();
         
          registerWithAgent(servicePerformance, super.getManagementInterface().getJmxDomain()+super.jmxContext+",r"+remoteIndex+"="+key+" [Remote Uima EE Service],name="+key+"_"+servicePerformance.getLabel());
View Full Code Here

          }
         
          if ( endpoint.isRemote())
          {
            Object o = null;
            ServiceInfo remoteDelegateServiceInfo =
              getDelegateServiceInfo(key);
            if ( remoteDelegateServiceInfo != null && remoteDelegateServiceInfo instanceof PrimitiveServiceInfo &&
               ( o = ((ProcessingResourceMetaData) resource).getConfigurationParameterSettings().getParameterValue(AnalysisEngineController.AEInstanceCount)) != null )
            {
              ((PrimitiveServiceInfo)remoteDelegateServiceInfo).setAnalysisEngineInstanceCount(((Integer)o).intValue());
View Full Code Here

    String key = lookUpDelegateKey(anEndpoint.getEndpoint());
    if ( !delegateStatMap.containsKey(key))
    {
      if ( key != null && anEndpoint != null)
      {
        ServiceInfo serviceInfo = anEndpoint.getServiceInfo();
        PrimitiveServiceInfo pServiceInfo = new PrimitiveServiceInfo();
        pServiceInfo.setBrokerURL(serviceInfo.getBrokerURL());
        pServiceInfo.setInputQueueName(serviceInfo.getInputQueueName());
        pServiceInfo.setState(serviceInfo.getState());
        pServiceInfo.setAnalysisEngineInstanceCount(1);

        ServicePerformance servicePerformance = new ServicePerformance();

        ServiceErrors serviceErrors = new ServiceErrors();
View Full Code Here

  }
  public ServiceInfo getServiceInfo()
  {
    if ( serviceInfo == null )
    {
      serviceInfo = new ServiceInfo();
      serviceInfo.setBrokerURL(serverURI);
      serviceInfo.setInputQueueName(endpoint);
      serviceInfo.setState("Active");
    }
    return serviceInfo;
View Full Code Here

    name = jmxManagement.getJmxDomain()+key_value_list+",name="+thisComponentName+"_"+servicePerformance.getLabel();
   
   
    registerWithAgent(servicePerformance, name );

    ServiceInfo serviceInfo = getInputChannel().getServiceInfo();
    ServiceInfo pServiceInfo = null;

    if ( this instanceof PrimitiveAnalysisEngineController )
    {
      pServiceInfo = ((PrimitiveAnalysisEngineController)this).getServiceInfo();
    }
    else
    {
      pServiceInfo =
        ((AggregateAnalysisEngineController)this).getServiceInfo();
    }
    if ( pServiceInfo != null )
    {
//      name = getJMXDomain()+key_value_list+",name="+thisComponentName+"_"+serviceInfo.getLabel();
      name = jmxManagement.getJmxDomain()+key_value_list+",name="+thisComponentName+"_"+serviceInfo.getLabel();
     
     
      if ( !isTopLevelComponent() )
      {
        pServiceInfo.setBrokerURL("Embedded Broker");
      }
      registerWithAgent(pServiceInfo, name );
    }

    serviceErrors = new ServiceErrors();
View Full Code Here

    timeSnapshotMap.put(aKey, snapshot);
   
  }
  public void addServiceInfo( ServiceInfo aServiceInfo )
  {
    ServiceInfo sInfo = null;

    if ( this instanceof PrimitiveAnalysisEngineController )
    {
      sInfo =
        ((PrimitiveAnalysisEngineController)this).getServiceInfo();
    }
    else if ( this instanceof AggregateAnalysisEngineController )
    {
      sInfo =
        ((AggregateAnalysisEngineController)this).getServiceInfo();
    }
    if ( sInfo != null )
    {
      sInfo.setBrokerURL(aServiceInfo.getBrokerURL());
      sInfo.setInputQueueName(aServiceInfo.getInputQueueName());
      sInfo.setState(aServiceInfo.getState());
      sInfo.setDeploymentDescriptor(deploymentDescriptor);
    }
    else
    {
      System.out.println("!!!!!!!!!!!!!!! ServiceInfo instance is NULL");
    }
View Full Code Here

  }
 
  public void setDeployDescriptor( String aDeployDescriptor )
  {
    deploymentDescriptor = aDeployDescriptor;
    ServiceInfo serviceInfo = null;
    if ( this instanceof PrimitiveAnalysisEngineController )
    {
      serviceInfo = ((PrimitiveAnalysisEngineController)this).getServiceInfo();
    }
    else
    {
      serviceInfo =((AggregateAnalysisEngineController)this).getServiceInfo();
    }
    if ( serviceInfo != null)
    {
      serviceInfo.setDeploymentDescriptor(deploymentDescriptor);
    }

  }
View Full Code Here

    name = jmxManagement.getJmxDomain() + key_value_list + ",name=" + thisComponentName + "_"
            + servicePerformance.getLabel();

    registerWithAgent(servicePerformance, name);
    servicePerformance.setIdleTime(System.nanoTime());
    ServiceInfo serviceInfo = null;
    if (remote) {
      serviceInfo = getInputChannel().getServiceInfo();
    } else {
      serviceInfo = new ServiceInfo(isCasMultiplier(), this);
      serviceInfo.setBrokerURL(getBrokerURL());
      serviceInfo.setInputQueueName(getName());
      //  if a colocated service, set its key as defined in the AE descriptor
      if ( !this.isTopLevelComponent() ) {
        serviceInfo.setServiceKey(delegateKey);
        //  Modify service performance MBean to expose number
        //  of threads processing replies
        Delegate delegate = ((AggregateAnalysisEngineController) parentController)
          .lookupDelegate(delegateKey);
        if ( delegate != null ) {
          servicePerformance.setReplyThreadCount(delegate.getEndpoint().getConcurrentReplyConsumers());
        }
      }
    }
    ServiceInfo pServiceInfo = null;

    if (this instanceof PrimitiveAnalysisEngineController) {
      pServiceInfo = ((PrimitiveAnalysisEngineController) this).getServiceInfo();
      servicePerformance.setProcessThreadCount(((PrimitiveAnalysisEngineController) this)
              .getServiceInfo().getAnalysisEngineInstanceCount());
    } else {
      pServiceInfo = ((AggregateAnalysisEngineController) this).getServiceInfo();
      pServiceInfo.setAggregate(true);
    }

    if (pServiceInfo != null) {
      // If this is a Cas Multiplier, add the key to the JMX MBean.
      // This will help the JMX Monitor to fetch the CM Cas Pool MBean
      if (isCasMultiplier()) {
        pServiceInfo.setServiceKey(getUimaContextAdmin().getQualifiedContextName());
        pServiceInfo.setCmRegisteredName(getUimaContextAdmin().getUniqueName());
      }

     
      name = jmxManagement.getJmxDomain() + key_value_list + ",name=" + thisComponentName + "_"
              + serviceInfo.getLabel();
      if (!isTopLevelComponent()) {
        pServiceInfo.setBrokerURL("Embedded Broker");
      } else {
        pServiceInfo.setTopLevel();
      }
      if (isCasMultiplier()) {
        pServiceInfo.setCASMultiplier();

      }
      registerWithAgent(pServiceInfo, name);
    }
View Full Code Here

  public String toString() {
    return getComponentName();
  }

  public void addServiceInfo(ServiceInfo aServiceInfo) {
    ServiceInfo sInfo = null;

    if (this instanceof PrimitiveAnalysisEngineController) {
      sInfo = ((PrimitiveAnalysisEngineController) this).getServiceInfo();
    } else if (this instanceof AggregateAnalysisEngineController) {
      sInfo = ((AggregateAnalysisEngineController) this).getServiceInfo();
    }
    if (sInfo != null) {
      sInfo.setBrokerURL(aServiceInfo.getBrokerURL());
      sInfo.setInputQueueName(aServiceInfo.getInputQueueName());
      sInfo.setState(aServiceInfo.getState());
      sInfo.setDeploymentDescriptorPath(aeDescriptor);
      if (isCasMultiplier()) {
        sInfo.setCASMultiplier();
      }
    }

  }
View Full Code Here

TOP

Related Classes of org.apache.uima.aae.jmx.ServiceInfo

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.