Package com.sun.grid.jgdi.event

Examples of com.sun.grid.jgdi.event.Event


     @param notification  the notification
     *  @param handback      the handback object
     */
    public void handleNotification(Notification notification, Object handback) {

        Event evt = null;
        if (notification.getUserData() instanceof Event) {
            evt = (Event) notification.getUserData();
        } else if (JMXConnectionNotification.CLOSED.equals(notification.getType())) {
            synchronized (this) {
                if (connector != null) {
                    try {
                        connector.removeConnectionNotificationListener(this);
                        close();
                        evt = new ConnectionClosedEvent(System.currentTimeMillis() / 1000, 0);
                    } catch (ListenerNotFoundException ex) {
                    // Ignore
                    }
                }
            }
        } else if (JMXConnectionNotification.FAILED.equals(notification.getType())) {
            synchronized (this) {
                if (connector != null) {
                    try {
                        connector.removeConnectionNotificationListener(this);
                        close();
                        evt = new ConnectionFailedEvent(System.currentTimeMillis() / 1000, 0);
                    } catch (ListenerNotFoundException ex) {
                    // Ignore
                    }
                }
            }
        }
        if (evt != null) {
            boolean isCloseEvent = ConnectionClosedEvent.class.isAssignableFrom(evt.getClass());
            if (!isCloseEvent || !closeEventSent) {
                Set<EventListener> tmpLis = null;
                synchronized (this) {
                    tmpLis = listeners;
                }
View Full Code Here

TOP

Related Classes of com.sun.grid.jgdi.event.Event

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.