Package pl.eternalsh.simplecalc.common.events

Examples of pl.eternalsh.simplecalc.common.events.ApplicationEvent


        while(true)
        {
            try
            {
                /* Take the first applicationEvent and handle it. */
                ApplicationEvent applicationEvent = blockingQueue.take();

                /* If somehow the controller has received an unknown applicationEvent - stop the application. */
                if(! eventStrategyMap.containsKey(applicationEvent.getClass()))
                {
                    throw new RuntimeException();
                }

                /* Handle the event. */
                eventStrategyMap.get(applicationEvent.getClass()).handle(applicationEvent);
            }
            catch(InterruptedException exception)
            {
                throw new RuntimeException();
            }
View Full Code Here

TOP

Related Classes of pl.eternalsh.simplecalc.common.events.ApplicationEvent

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.