Examples of DiagnosisUtil


Examples of net.xeoh.plugins.diagnosis.local.util.DiagnosisUtil

        diagnosis.channel(TestChannel.class).status(100);
        diagnosis.channel(TestChannel.class).status(3000);
        diagnosis.channel(LoggingChannel1.class).status("Initializing Status");
       
       
        DiagnosisUtil util = new DiagnosisUtil(diagnosis);
        util.registerMonitors(new DiagnosisMonitor<Serializable>() {
            @Override
            public void onStatusChange(DiagnosisStatus<Serializable> status) {
                if(status.getChannel().equals(TestChannel.class)) System.out.println("TC");
                System.out.println(">>> " + status.getValue());
            }
        }, TestChannel.class, LoggingChannel1.class);

        diagnosis.channel(TestChannel.class).status(6667);
        diagnosis.channel(TestChannel.class).status(100);

  
        util.registerCondition(new TwoStateMatcherAND() {
            /** */
            @Override
            protected void setupMatcher() {
                match(TestChannel.class, new Is(100));
                match(LoggingChannel1.class, new Contains("xtatus"));
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.