예제 #1
0
        /// <summary>
        /// get the service value for a specific service by name or null if no such
        /// Service exists.
        ///
        /// </summary>
        public virtual S getServiceValue <S>(org.camunda.bpm.container.impl.spi.PlatformServiceContainer_ServiceType type, string localName)
        {
            string     globalName  = composeLocalName(type, localName);
            ObjectName serviceName = getObjectName(globalName);

            return(getServiceValue(serviceName));
        }
예제 #2
0
 public virtual void startService <S>(org.camunda.bpm.container.impl.spi.PlatformServiceContainer_ServiceType serviceType, string localName, PlatformService <S> service)
 {
     lock (this)
     {
         string serviceName = composeLocalName(serviceType, localName);
         startService(serviceName, service);
     }
 }
예제 #3
0
 public virtual void stopService(org.camunda.bpm.container.impl.spi.PlatformServiceContainer_ServiceType serviceType, string localName)
 {
     lock (this)
     {
         string globalName = composeLocalName(serviceType, localName);
         stopService(globalName);
     }
 }
예제 #4
0
        /// <returns> the service names ( <seealso cref="ObjectName"/> ) for all services for a given type </returns>
        public virtual ISet <string> getServiceNames(org.camunda.bpm.container.impl.spi.PlatformServiceContainer_ServiceType type)
        {
            string            typeName       = composeLocalName(type, "*");
            ObjectName        typeObjectName = getObjectName(typeName);
            ISet <ObjectName> resultNames    = getmBeanServer().queryNames(typeObjectName, null);
            ISet <string>     result         = new HashSet <string>();

            foreach (ObjectName objectName in resultNames)
            {
                result.Add(objectName.ToString());
            }
            return(result);
        }
예제 #5
0
        /// <returns> all services for a specific <seealso cref="ServiceType"/> </returns>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") public <S> java.util.List<org.camunda.bpm.container.impl.spi.PlatformService<S>> getServicesByType(org.camunda.bpm.container.impl.spi.PlatformServiceContainer_ServiceType type)
        public virtual IList <PlatformService <S> > getServicesByType <S>(org.camunda.bpm.container.impl.spi.PlatformServiceContainer_ServiceType type)
        {
            // query the MBeanServer for all services of the given type
            ISet <string> serviceNames = getServiceNames(type);

            IList <PlatformService <S> > res = new List <PlatformService <S> >();

            foreach (string serviceName in serviceNames)
            {
                res.Add((PlatformService <S>)servicesByName[getObjectName(serviceName)]);
            }

            return(res);
        }
예제 #6
0
 public static string composeLocalName(org.camunda.bpm.container.impl.spi.PlatformServiceContainer_ServiceType type, string localName)
 {
     return(type.TypeName + ":type=" + localName);
 }