Examples of MyListener


Examples of net.test.simple.core._08_event.listener.MyListener

        EventContext ec = appContext.getEnvironment().getEventContext();
        //
        final String EventName = "MyEvent";//事件链的终端
        final String SeedEvent = "SeedEvent";//种子事件
        //1.添加事件监听器F
        ec.addListener(EventName, new MyListener());
        ec.addListener(SeedEvent, new EventListener() {
            public void onEvent(String event, Object[] params) throws Throwable {
                AppContext app = (AppContext) params[0];
                EventContext localEC = app.getEnvironment().getEventContext();
                System.out.println("before MyEvent.");
View Full Code Here

Examples of net.test.simple.core._08_event.listener.MyListener

        AppContext appContext = Hasor.createAppContext();
        EventContext ec = appContext.getEnvironment().getEventContext();
        //
        String EventName = "MyEvent";
        //1.添加事件监听器
        ec.addListener(EventName, new MyListener());
        //2.引发异步事件
        for (int i = 0; i < 10; i++)
            ec.fireAsyncEvent(EventName, i);
        //3.由于是异步事件,因此下面这条日志会在事件喷出Log之前打印
        System.out.println("before Event do sth...");
View Full Code Here

Examples of net.test.simple.core._08_event.listener.MyListener

        AppContext appContext = Hasor.createAppContext();
        EventContext ec = appContext.getEnvironment().getEventContext();
        //
        String EventName = "MyEvent";
        //1.添加事件监听器
        ec.pushListener(EventName, new MyListener());
        //2.引发异步事件,虽然引发了10次事件但只有一次会被执行。
        for (int i = 0; i < 10; i++)
            ec.fireAsyncEvent(EventName, i);
        //3.由于事件引发一次是同步事件,因此下面这条日志会在事件处理完毕之后喷出
        System.out.println("before Event do sth...");
View Full Code Here

Examples of net.test.simple.core._08_event.listener.MyListener

        AppContext appContext = Hasor.createAppContext();
        EventContext ec = appContext.getEnvironment().getEventContext();
        //
        String EventName = "MyEvent";
        //1.添加事件监听器
        ec.addListener(EventName, new MyListener());
        //2.引发异步事件
        for (int i = 0; i < 10; i++)
            ec.fireSyncEvent(EventName, i);
        //3.由于是同步事件,因此下面这条日志会在事件处理完毕之后喷出
        System.out.println("before Event do sth...");
View Full Code Here

Examples of net.test.simple.core._08_event.listener.MyListener

        AppContext appContext = Hasor.createAppContext();
        EventContext ec = appContext.getEnvironment().getEventContext();
        //
        String EventName = "MyEvent";
        //1.添加事件监听器
        ec.pushListener(EventName, new MyListener());
        //2.引发异步事件,虽然引发了10次事件但只有一次会被执行。
        for (int i = 0; i < 10; i++)
            ec.fireSyncEvent(EventName, i);
        //3.由于事件引发一次是同步事件,因此下面这条日志会在事件处理完毕之后喷出
        System.out.println("after Event do sth...");
View Full Code Here

Examples of org.apache.hadoop.mapred.TestJobInProgressListener.MyListener

        UserGroupInformation MR_UGI = UserGroupInformation.getLoginUser();

        // Create a TestJobInProgressListener.MyListener and associate
        // it with the MiniMRCluster

        myListener = new MyListener();
        conf.set(JTConfig.JT_IPC_HANDLER_COUNT, "1");
        mrCluster =   new MiniMRCluster(0, 0,
            numTT, fs.getUri().toString(),
            1, null, null, MR_UGI, new JobConf());
        // make cleanup inline sothat validation of existence of these directories
View Full Code Here

Examples of org.apache.hadoop.mapred.TestJobInProgressListener.MyListener

    UserGroupInformation MR_UGI = UserGroupInformation.getLoginUser();

    // Create a TestJobInProgressListener.MyListener and associate
    // it with the MiniMRCluster

    myListener = new MyListener();
    conf.set(JTConfig.JT_IPC_HANDLER_COUNT, "1");
    mrCluster =   new MiniMRCluster(0, 0,
        numTT, fs.getUri().toString(),
        1, null, null, MR_UGI, new JobConf());
    // make cleanup inline sothat validation of existence of these directories
View Full Code Here

Examples of org.apache.hadoop.mapred.TestJobInProgressListener.MyListener

        UserGroupInformation MR_UGI = UserGroupInformation.getLoginUser();

        // Create a TestJobInProgressListener.MyListener and associate
        // it with the MiniMRCluster

        myListener = new MyListener();
        conf.set(JTConfig.JT_IPC_HANDLER_COUNT, "1");
        mrCluster =   new MiniMRCluster(0, 0,
            numTT, fs.getUri().toString(),
            1, null, null, MR_UGI, new JobConf());
        // make cleanup inline sothat validation of existence of these directories
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.