Package org.rioproject.monitor.service

Examples of org.rioproject.monitor.service.InstantiatorResource


     */
    public ServiceResource[] getServiceResources(final ProvisionRequest provisionRequest) throws ProvisionException {
        ServiceResource[] svcResources = getServiceResources();
        ArrayList<ServiceResource> list = new ArrayList<ServiceResource>();
        for (ServiceResource svcResource : svcResources) {
            InstantiatorResource ir = (InstantiatorResource) svcResource.getResource();
            try {
                if (ir.canProvision(provisionRequest)) {
                    list.add(svcResource);
                }
            } catch (Exception e) {
                logger.warn("[{}] during canProvision check for [{}/{}]",
                            ir.getName(),
                            provisionRequest.getServiceElement().getOperationalStringName(),
                            provisionRequest.getServiceElement().getName(),
                            e);
                if(e instanceof ProvisionException)
                    throw (ProvisionException)e;
View Full Code Here


     */
    ServiceResource[] getServiceResources(final Uuid uuid, final boolean inclusive) {
        ServiceResource[] svcResources = getServiceResources();
        ArrayList<ServiceResource> list = new ArrayList<ServiceResource>();
        for (ServiceResource svcResource : svcResources) {
            InstantiatorResource ir = (InstantiatorResource) svcResource.getResource();
            if (ir.getInstantiatorUuid().equals(uuid)) {
                if (inclusive)
                    list.add(svcResource);
            } else {
                if (!inclusive)
                    list.add(svcResource);
View Full Code Here

     * @return Array of ServiceResource instances that match the host address
     */
    ServiceResource[] getServiceResources(final ServiceResource[] svcResources, final String hostAddress, final boolean inclusive) {
        ArrayList<ServiceResource> list = new ArrayList<ServiceResource>();
        for (ServiceResource svcResource : svcResources) {
            InstantiatorResource ir = (InstantiatorResource) svcResource.getResource();
            if (ir.getHostAddress().equals(hostAddress)) {
                if (inclusive)
                    list.add(svcResource);
            } else {
                if (!inclusive)
                    list.add(svcResource);
View Full Code Here

     */
    InstantiatorResource[] getInstantiatorResources(final ServiceElement sElem, final boolean includeInProcess) {
        ServiceResource[] svcResources = getServiceResources();
        ArrayList<InstantiatorResource> list = new ArrayList<InstantiatorResource>();
        for (ServiceResource svcResource : svcResources) {
            InstantiatorResource ir = (InstantiatorResource) svcResource.getResource();
            if (includeInProcess) {
                if (ir.getServiceElementCount(sElem) > 0 ||
                    ir.getInProcessCounter(sElem) > 0)
                    list.add(ir);
            } else {
                if (ir.getServiceElementCount(sElem) > 0)
                    list.add(ir);
            }
        }           
        return list.toArray(new InstantiatorResource[list.size()]);
    }
View Full Code Here

            } else {
                resource = selector.getServiceResource(request);
            }

            if (resource != null) {
                InstantiatorResource ir = (InstantiatorResource) resource.getResource();
                ir.incrementProvisionCounter(request.getServiceElement());
            }
        } catch (ProvisionException e) {
            if (e.isUninstantiable()) {
                request.setType(ProvisionRequest.Type.UNINSTANTIABLE);
                request.getListener().uninstantiable(request);
View Full Code Here

TOP

Related Classes of org.rioproject.monitor.service.InstantiatorResource

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.