Package com.alibaba.json.bvt.parser

Examples of com.alibaba.json.bvt.parser.DefaultExtJSONParserTest_6$V1


        mtosiHeader.value.setMsgName("getActiveAlarmsCountResponse");
        mtosiHeader.value.setMsgType(MsgTypeT.RESPONSE);
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");
        mtosiHeader.value.setTimestamp(formatter.format(new Date()));

        GetActiveAlarmsCountResponseT response = new GetActiveAlarmsCountResponseT();
        response.setActiveAlarmCount(alarms.size());

        return response;
    }
View Full Code Here


        header.setCommunicationStyle(CommunicationStyleT.MSG);
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");
        header.setTimestamp(formatter.format(new Date()));
        Holder<HeaderT> mtosiHeader = new Holder<HeaderT>(header);

        GetActiveAlarmsCountT mtosiBody = new GetActiveAlarmsCountT();
        mtosiBody.setFilter(new ActiveAlarmFilterT());

        // use polling method to obtain response
       
        System.out.println("Invoking getActiveAlarmsCountAsync using polling.");
        Response<GetActiveAlarmsCountResponseT> response =
View Full Code Here

                mtosiHeader.value.setBatchSequenceEndOfReply(Boolean.FALSE);
            }
        } else {
            alarmList.getActiveAlarm().addAll(alarms);
        }
        GetActiveAlarmsResponseT response = new GetActiveAlarmsResponseT();
        response.setActiveAlarmList(alarmList);

        return response;
    }
View Full Code Here

        header.setRequestedBatchSize(new Long(2));
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");
        header.setTimestamp(formatter.format(new Date()));
        Holder<HeaderT> mtosiHeader = new Holder<HeaderT>(header);

        GetActiveAlarmsT mtosiBody = new GetActiveAlarmsT();
        mtosiBody.setFilter(new ActiveAlarmFilterT());

        // use callback method to obtain response
       
        System.out.println("Invoking getActiveAlarmsAsync using callback.");
        AsyncAlarmHandler handler = new AsyncAlarmHandler();
View Full Code Here

        System.exit(0);
    }

    private static void getActiveAlarmsCount(AlarmRetrieval port) {

        HeaderT header = new HeaderT();
        header.setActivityName("getActiveAlarmsCountAsync");
        header.setMsgName("getActiveAlarmsCountAsync");
        header.setMsgType(MsgTypeT.REQUEST);
        header.setSenderURI("http://mtosi.iona.com/fault/sender");
        header.setDestinationURI("http://mtosi.iona.com/fault/destination");
        header.setCommunicationPattern(CommunicationPatternT.SIMPLE_RESPONSE);
        header.setCommunicationStyle(CommunicationStyleT.MSG);
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");
        header.setTimestamp(formatter.format(new Date()));
        Holder<HeaderT> mtosiHeader = new Holder<HeaderT>(header);

        GetActiveAlarmsCountT mtosiBody = new GetActiveAlarmsCountT();
        mtosiBody.setFilter(new ActiveAlarmFilterT());
View Full Code Here

        System.out.println();
    }

    private static void getActiveAlarms(AlarmRetrieval port) {

        HeaderT header = new HeaderT();
        header.setActivityName("getActiveAlarmsAsync");
        header.setMsgName("getActiveAlarmsAsync");
        header.setMsgType(MsgTypeT.REQUEST);
        header.setSenderURI("http://mtosi.iona.com/fault/sender");
        header.setDestinationURI("http://mtosi.iona.com/fault/destination");
        header.setCommunicationPattern(CommunicationPatternT.SIMPLE_RESPONSE);
        header.setCommunicationStyle(CommunicationStyleT.MSG);
        header.setRequestedBatchSize(new Long(2));
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");
        header.setTimestamp(formatter.format(new Date()));
        Holder<HeaderT> mtosiHeader = new Holder<HeaderT>(header);

        GetActiveAlarmsT mtosiBody = new GetActiveAlarmsT();
        mtosiBody.setFilter(new ActiveAlarmFilterT());
View Full Code Here

        switch (alarmID % 2) {
        case 1:
            eventInfo.setNotificationId("0001239");
            eventInfo.setObjectType(ObjectTypeT.OT_EQUIPMENT);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setNeTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_odd_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(false);
            alarm.setLayerRate("PROP_layer_rate_odd");
            alarm.setProbableCause(probableCause);
            alarm.setPerceivedSeverity("PROP_odd_perceived_severity");
            alarm.setServiceAffecting(ServiceAffectingT.SA_UNKNOWN);
            alarm.setRcaiIndicator(false);
            break;

        default:
            eventInfo.setNotificationId("9876543");
            eventInfo.setObjectType(ObjectTypeT.OT_OS);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_even_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(true);
View Full Code Here

            String layerRate = alarm.getLayerRate();
            if (layerRate != null) {
                System.out.println("- Layer/Rate: " + layerRate);
            }

            ProbableCauseT probableCause = alarm.getProbableCause();
            String type = probableCause.getType();
            if (type != null) {
                System.out.println("- Probable cause type: " + type);
            }

            String perceivedSeverity = alarm.getPerceivedSeverity();
View Full Code Here

    public void addAlarm(int alarmID) {

        AlarmT alarm = new AlarmT();

        EventInformationT eventInfo = new EventInformationT();
        ProbableCauseT probableCause = new ProbableCauseT();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");

        switch (alarmID % 2) {
        case 1:
            eventInfo.setNotificationId("0001239");
            eventInfo.setObjectType(ObjectTypeT.OT_EQUIPMENT);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setNeTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_odd_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(false);
            alarm.setLayerRate("PROP_layer_rate_odd");
            alarm.setProbableCause(probableCause);
            alarm.setPerceivedSeverity("PROP_odd_perceived_severity");
            alarm.setServiceAffecting(ServiceAffectingT.SA_UNKNOWN);
            alarm.setRcaiIndicator(false);
            break;

        default:
            eventInfo.setNotificationId("9876543");
            eventInfo.setObjectType(ObjectTypeT.OT_OS);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_even_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(true);
            alarm.setLayerRate("PROP_layer_rate_even");
            alarm.setProbableCause(probableCause);
            alarm.setPerceivedSeverity("PROP_even_perceived_severity");
View Full Code Here

TOP

Related Classes of com.alibaba.json.bvt.parser.DefaultExtJSONParserTest_6$V1

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.