Package org.objectweb.celtix

Examples of org.objectweb.celtix.BusEvent


    }


    public synchronized void addEvent(BusEvent e) {
        if (events.size() == maxEventsCache) {
            BusEvent event = (BusEvent)events.get(0);
            LOG.log(Level.FINE, "Event "
                                + event.getID()
                                + " is removed because the event cache is full."
                                + " Maximum number of events stored : "
                                + maxEventsCache);
                                         
            events.remove(event);
View Full Code Here



    public synchronized List<BusEvent> flushEvents(String eventID) {
        List<BusEvent> result = new ArrayList<BusEvent>();
        for (Iterator<BusEvent> i = events.iterator(); i.hasNext();) {
            BusEvent event = i.next();
            if (eventID.equals(event.getID())) {
                result.add(event);
                i.remove();
            }               
        }  
View Full Code Here

    }

    public synchronized List<BusEvent> flushEvents(Class<?> eventClass) {
        List<BusEvent> result = new ArrayList<BusEvent>();
        for (Iterator<BusEvent> i = events.iterator(); i.hasNext();) {
            BusEvent event = i.next();
            if (eventClass.isAssignableFrom(event.getClass())) {
                result.add(event);
                i.remove();
            }
        }
View Full Code Here

    public List<BusEvent> getEvents(String eventID) {
        List<BusEvent> result = new ArrayList<BusEvent>();

        for (int i = 0; i < events.size(); i++) {
            BusEvent event = (BusEvent)events.get(i);

            if (eventID.equals(event.getID())) {
                result.add(event);
            }
        }

        return result;
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.BusEvent

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.