Examples of Treference


Examples of org.apache.aries.blueprint.jaxb.Treference

            for (int i = 0; i < fields.length; i++) {
                if (fields[i].isAnnotationPresent(Inject.class)) {
                    if (fields[i].isAnnotationPresent(Reference.class)) {
                        // the field is also annotated with @Reference
                        Reference ref = (Reference)fields[i].getAnnotation(Reference.class);
                        Treference tref = generateTref(ref, reflMap);
                        components.add(tref);
                    } else if (fields[i].isAnnotationPresent(ReferenceList.class)) {
                        // the field is also annotated with @ReferenceList
                        ReferenceList ref = (ReferenceList)fields[i].getAnnotation(ReferenceList.class);
                        TreferenceList tref = generateTrefList(ref, reflMap);
View Full Code Here

Examples of org.apache.aries.blueprint.jaxb.Treference

        String desp = ref.description();
        String filter = ref.filter();
        Class<?> serviceInterface = ref.serviceInterface();
        ReferenceListener[] refListeners = ref.referenceListeners();
        int timeout = ref.timeout();
        Treference tref = new Treference();
       
        // can not think of configuring depends on for reference
        tref.setDependsOn(null);
       
        if (id.length() > 0) {
            tref.setId(id);
        }
       
        if (availability.length() > 0) {
            tref.setAvailability(availability);
        }
        if (compName.length() > 0) {
            tref.setComponentName(compName);
        }
        if (desp.length() > 0) {
            Tdescription value = new Tdescription();
            value.getContent().add(desp);
            tref.setDescription(value);
        }
        if (filter.length() > 0) {
            tref.setFilter(filter);
        }
        if (serviceInterface != Object.class) {
            tref.setInterface(serviceInterface.getName());
        }
       
        if (timeout > 0) {
            tref.setTimeout(convertToBigInteger(timeout));
        }
        for (ReferenceListener rl : refListeners) {
            String rf = rl.ref();
            TreferenceListener trl = reflMap.get(rf);
            if (trl != null) {
                trl.setRefAttribute(rf);
                tref.getReferenceListener().add(trl);
            } else {
                throw new BlueprintAnnotationException("Unable to find the ReferenceListener ref " + rf);
            }
        }
       
View Full Code Here

Examples of org.apache.aries.blueprint.jaxb.Treference

            for (int i = 0; i < fields.length; i++) {
                if (fields[i].isAnnotationPresent(Inject.class)) {
                    if (fields[i].isAnnotationPresent(Reference.class)) {
                        // the field is also annotated with @Reference
                        Reference ref = fields[i].getAnnotation(Reference.class);
                        Treference tref = generateTref(ref, reflMap);
                        components.add(tref);
                    } else if (fields[i].isAnnotationPresent(ReferenceList.class)) {
                        // the field is also annotated with @ReferenceList
                        ReferenceList ref = fields[i].getAnnotation(ReferenceList.class);
                        TreferenceList tref = generateTrefList(ref, reflMap);
View Full Code Here

Examples of org.apache.aries.blueprint.jaxb.Treference

        String desp = ref.description();
        String filter = ref.filter();
        Class<?> serviceInterface = ref.serviceInterface();
        ReferenceListener[] refListeners = ref.referenceListeners();
        int timeout = ref.timeout();
        Treference tref = new Treference();
       
        // can not think of configuring depends on for reference
        tref.setDependsOn(null);
       
        if (id.length() > 0) {
            tref.setId(id);
        }
       
        if (availability.length() > 0) {
            tref.setAvailability(availability);
        }
        if (compName.length() > 0) {
            tref.setComponentName(compName);
        }
        if (desp.length() > 0) {
            Tdescription value = new Tdescription();
            value.getContent().add(desp);
            tref.setDescription(value);
        }
        if (filter.length() > 0) {
            tref.setFilter(filter);
        }
        if (serviceInterface != Object.class) {
            tref.setInterface(serviceInterface.getName());
        }
       
        if (timeout > 0) {
            tref.setTimeout(convertToBigInteger(timeout));
        }
        for (ReferenceListener rl : refListeners) {
            String rf = rl.ref();
            TreferenceListener trl = reflMap.get(rf);
            if (trl != null) {
                trl.setRefAttribute(rf);
                tref.getReferenceListener().add(trl);
            } else {
                throw new BlueprintAnnotationException("Unable to find the ReferenceListener ref " + rf);
            }
        }
       
View Full Code Here

Examples of org.apache.aries.blueprint.jaxb.Treference

            for (int i = 0; i < fields.length; i++) {
                if (fields[i].isAnnotationPresent(Inject.class)) {
                    if (fields[i].isAnnotationPresent(Reference.class)) {
                        // the field is also annotated with @Reference
                        Reference ref = (Reference)fields[i].getAnnotation(Reference.class);
                        Treference tref = generateTref(ref, reflMap);
                        components.add(tref);
                    } else if (fields[i].isAnnotationPresent(ReferenceList.class)) {
                        // the field is also annotated with @ReferenceList
                        ReferenceList ref = (ReferenceList)fields[i].getAnnotation(ReferenceList.class);
                        TreferenceList tref = generateTrefList(ref, reflMap);
View Full Code Here

Examples of org.apache.aries.blueprint.jaxb.Treference

        String desp = ref.description();
        String filter = ref.filter();
        Class<?> serviceInterface = ref.serviceInterface();
        ReferenceListener[] refListeners = ref.referenceListeners();
        int timeout = ref.timeout();
        Treference tref = new Treference();
       
        // can not think of configuring depends on for reference
        tref.setDependsOn(null);
       
        if (id.length() > 0) {
            tref.setId(id);
        }
       
        if (availability.length() > 0) {
            tref.setAvailability(availability);
        }
        if (compName.length() > 0) {
            tref.setComponentName(compName);
        }
        if (desp.length() > 0) {
            Tdescription value = new Tdescription();
            value.getContent().add(desp);
            tref.setDescription(value);
        }
        if (filter.length() > 0) {
            tref.setFilter(filter);
        }
        if (serviceInterface != Object.class) {
            tref.setInterface(serviceInterface.getName());
        }
       
        if (timeout > 0) {
            tref.setTimeout(convertToBigInteger(timeout));
        }
        for (ReferenceListener rl : refListeners) {
            String rf = rl.ref();
            TreferenceListener trl = reflMap.get(rf);
            if (trl != null) {
                trl.setRefAttribute(rf);
                tref.getReferenceListener().add(trl);
            } else {
                throw new BlueprintAnnotationException("Unable to find the ReferenceListener ref " + rf);
            }
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.