Package org.rioproject.monitor

Examples of org.rioproject.monitor.ProvisionFailureEvent


    }

    private RemoteServiceEventNode createRemoteServiceEventNode(RemoteServiceEvent event) {
        RemoteServiceEventNode remoteServiceEventNode = null;
        if(event instanceof ProvisionFailureEvent) {
            ProvisionFailureEvent pfe = (ProvisionFailureEvent)event;
            remoteServiceEventNode = new ProvisionFailureEventNode(pfe);
        }
        if(event instanceof ProvisionMonitorEvent) {
            ProvisionMonitorEvent pme = (ProvisionMonitorEvent)event;
            remoteServiceEventNode = new ProvisionMonitorEventNode(pme);
View Full Code Here


        if(theEvent==null)
            throw new IllegalArgumentException("event is null");
        if(!(theEvent instanceof ProvisionFailureEvent)) {
            throw new UnknownEventException("Not a ProvisionFailureEvent ["+theEvent.getClass().getName()+"]");
        }
        ProvisionFailureEvent event = (ProvisionFailureEvent)theEvent;
        StringBuilder builder = new StringBuilder();
        for(String reason : event.getFailureReasons()) {
            if(builder.length()>0)
                builder.append("\n    ");
            builder.append(reason);
        }
        Notification notification = new Notification(EVENT_TYPE,
                                                     objectName,
                                                     event.getSequenceNumber(),
                                                     event.getDate().getTime(),
                                                     builder.toString());
        notificationBroadcasterSupport.sendNotification(notification);
    }
View Full Code Here

            tableData.clear();
            String impl = "<not declared>";
            Throwable thrown;
            if(event instanceof ProvisionFailureEvent) {
                String label = "ProvisionFailureEvent."+eventNode.getValueAt(0);
                ProvisionFailureEvent pfe = (ProvisionFailureEvent)event;
                ServiceElement elem = pfe.getServiceElement();
                if(elem.getComponentBundle()!=null)
                    impl = elem.getComponentBundle().getClassName();
                thrown = pfe.getThrowable();
                String exception = getExceptionText(thrown);
                tableData.put("Event", label);
                tableData.put("When", Constants.DATE_FORMAT.format(event.getDate()));
                tableData.put("Deployment", elem.getOperationalStringName());
                tableData.put("Service", elem.getName());
                tableData.put("Class", impl);
                StringBuilder builder = new StringBuilder();
                for(String reason : pfe.getFailureReasons()) {
                    if(builder.length()>0)
                        builder.append("\n    ");
                    builder.append(reason);
                }
                tableData.put("Reason", builder.toString());
View Full Code Here

                if(!request.getType().equals(ProvisionRequest.Type.RELOCATE)) {
                    pendingMgr.addProvisionRequest(request, index);
                    logger.debug("Wrote [{}] to {}", LoggingUtil.getLoggingName(request), pendingMgr.getType());
                    pendingMgr.dumpCollection();
                }
                processProvisionFailure(new ProvisionFailureEvent(eventSource,
                                                                  request.getServiceElement(),
                                                                  request.getFailureReasons(),
                                                                  null));
            }
        } catch(Throwable t) {
            logger.warn("Dispatching ProvisionRequest", t);
            processProvisionFailure(new ProvisionFailureEvent(eventSource,
                                                              request.getServiceElement(),
                                                              t.getClass().getName()+":"+t.getLocalizedMessage(),
                                                              t));
        }
    }
View Full Code Here

TOP

Related Classes of org.rioproject.monitor.ProvisionFailureEvent

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.