Package org.apache.activemq.broker.scheduler

Examples of org.apache.activemq.broker.scheduler.JobSchedulerStore$MetaData


        HttpURLConnection con = (HttpURLConnection) new URL(request).openConnection();
        con.setRequestProperty("User-Agent", "JMP3renamer MusicBrainz Plug-in " + MusicBrainz.VERSION);
        InputStream in = con.getInputStream();

        Object o = unm.unmarshal(in);
        Metadata md = (Metadata) o;
        ReleaseList rl = md.getReleaseList();
        if (rl != null) {
            List<Release> list = rl.getRelease();
            for (Release release : list) {
                MusicBrainzAlbum mba = new MusicBrainzAlbum();
                mba.setTitle(release.getTitle());
View Full Code Here


        logger.debug("Request: {}", request);
        HttpURLConnection con = (HttpURLConnection) new URL(request).openConnection();
        con.setRequestProperty("User-Agent", "JMP3renamer MusicBrainz Plug-in " + MusicBrainz.VERSION);
        InputStream in = con.getInputStream();

        Metadata md = (Metadata) unm.unmarshal(in);
        MediumList ml = md.getRelease().getMediumList();
        List<Medium> mediums = ml.getMedium();
        for (Medium medium : mediums) {
            TrackList tracks = medium.getTrackList();
            for (Track track : tracks.getDefTrack()) {
                logger.debug("Found track: {}", track.getTitle());
View Full Code Here

                }
            }
        }

        if (getJobSchedulerStore() != null) {
            JobSchedulerStore scheduler = getJobSchedulerStore();
            File schedulerDir = scheduler.getDirectory();
            if (schedulerDir != null) {

                String schedulerDirPath = schedulerDir.getAbsolutePath();
                if (!schedulerDir.isAbsolute()) {
                    schedulerDir = new File(schedulerDirPath);
View Full Code Here

            }
        }

        if (brokerService != null && brokerService.getJobSchedulerStore() != null) {
            JobSchedulerStore scheduler = brokerService.getJobSchedulerStore();
            File dir = scheduler.getDirectory();
            if (brokerService.isPersistent()) {
                SystemUsage usage = brokerService.getSystemUsage();
                if (dir != null && usage != null) {
                    String dirPath = dir.getAbsolutePath();
                    if (!dir.isAbsolute()) {
                        dir = new File(dirPath);
                    }


                    while (dir != null && !dir.isDirectory()) {
                        dir = dir.getParentFile();
                    }
                    long storeSize = scheduler.size();
                    long storeLimit = usage.getJobSchedulerUsage().getLimit();
                    long dirFreeSpace = dir.getUsableSpace();

                    if (storeSize != 0) {
                        int val = (int) ((storeSize * 100) / storeLimit);
                        if (val > 90) {
                            answer.add(new HealthStatus("org.apache.activemq.JobSchedulerLimit", "WARNING", "JobSchedulerMessage Store size is within " + val + "% of its limit", scheduler.toString()));
                        }
                    }


                    if ((storeLimit - storeSize) > dirFreeSpace) {
                        String message = "JobSchedulerStore limit is " + storeLimit / (1024 * 1024) +
                                " mb, whilst the data directory: " + dir.getAbsolutePath() +
                                " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space";
                        answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, scheduler.toString()));
                    }

                }
            }
        }
View Full Code Here

                }
            }
        }

        if (getJobSchedulerStore() != null) {
            JobSchedulerStore scheduler = getJobSchedulerStore();
            File schedulerDir = scheduler.getDirectory();
            if (schedulerDir != null) {

                String schedulerDirPath = schedulerDir.getAbsolutePath();
                if (!schedulerDir.isAbsolute()) {
                    schedulerDir = new File(schedulerDirPath);
View Full Code Here

            }
        }

        if (brokerService != null && brokerService.getJobSchedulerStore() != null) {
            JobSchedulerStore scheduler = brokerService.getJobSchedulerStore();
            File dir = scheduler.getDirectory();
            if (brokerService.isPersistent()) {
                SystemUsage usage = brokerService.getSystemUsage();
                if (dir != null && usage != null) {
                    String dirPath = dir.getAbsolutePath();
                    if (!dir.isAbsolute()) {
                        dir = new File(dirPath);
                    }


                    while (dir != null && !dir.isDirectory()) {
                        dir = dir.getParentFile();
                    }
                    long storeSize = scheduler.size();
                    long storeLimit = usage.getJobSchedulerUsage().getLimit();
                    long dirFreeSpace = dir.getUsableSpace();

                    if (storeSize != 0) {
                        int val = (int) ((storeSize * 100) / storeLimit);
                        if (val > 90) {
                            answer.add(new HealthStatus("org.apache.activemq.JobSchedulerLimit", "WARNING", "JobSchedulerMessage Store size is within " + val + "% of its limit", scheduler.toString()));
                        }
                    }


                    if ((storeLimit - storeSize) > dirFreeSpace) {
                        String message = "JobSchedulerStore limit is " + storeLimit / (1024 * 1024) +
                                " mb, whilst the data directory: " + dir.getAbsolutePath() +
                                " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space";
                        answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, scheduler.toString()));
                    }

                }
            }
        }
View Full Code Here

                }
            }
        }

        if (getJobSchedulerStore() != null) {
            JobSchedulerStore scheduler = getJobSchedulerStore();
            File schedulerDir = scheduler.getDirectory();
            if (schedulerDir != null) {

                String schedulerDirPath = schedulerDir.getAbsolutePath();
                if (!schedulerDir.isAbsolute()) {
                    schedulerDir = new File(schedulerDirPath);
View Full Code Here

                }
            }
        }

        if (getJobSchedulerStore() != null) {
            JobSchedulerStore scheduler = getJobSchedulerStore();
            File schedulerDir = scheduler.getDirectory();
            if (schedulerDir != null) {

                String schedulerDirPath = schedulerDir.getAbsolutePath();
                if (!schedulerDir.isAbsolute()) {
                    schedulerDir = new File(schedulerDirPath);
View Full Code Here

                }
            }
        }

        if (brokerService != null && brokerService.getJobSchedulerStore() != null) {
            JobSchedulerStore scheduler = brokerService.getJobSchedulerStore();
            File dir = scheduler.getDirectory();
            if (brokerService.isPersistent()) {
                SystemUsage usage = brokerService.getSystemUsage();
                if (dir != null && usage != null) {
                    String dirPath = dir.getAbsolutePath();
                    if (!dir.isAbsolute()) {
                        dir = new File(dirPath);
                    }

                    while (dir != null && !dir.isDirectory()) {
                        dir = dir.getParentFile();
                    }
                    long storeSize = scheduler.size();
                    long storeLimit = usage.getJobSchedulerUsage().getLimit();
                    long dirFreeSpace = dir.getUsableSpace();

                    if (storeSize != 0 && storeLimit != 0) {
                        int val = (int) ((storeSize * 100) / storeLimit);
                        if (val > 90) {
                            answer.add(new HealthStatus("org.apache.activemq.JobSchedulerLimit", "WARNING", "JobSchedulerMessage Store size is within " + val
                                + "% of its limit", scheduler.toString()));
                        }
                    }

                    if ((storeLimit - storeSize) > dirFreeSpace) {
                        String message = "JobSchedulerStore limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: "
                            + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space";
                        answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, scheduler.toString()));
                    }
                }
            }
        }

View Full Code Here

            try {
                JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
                proxyFac.setBindingId(soapVersion);
                proxyFac.setAddress(mexLoc);
                MetadataExchange exc = proxyFac.create(MetadataExchange.class);
                Metadata metadata = exc.get2004();
                for (MetadataSection s : metadata.getMetadataSection()) {
                    if ("http://schemas.xmlsoap.org/wsdl/".equals(s.getDialect())) {
                        //got the wsdl...
                        Definition definition = bus.getExtension(WSDLManager.class)
                            .getDefinition((Element)s.getAny());
                        WSDLServiceFactory factory = new WSDLServiceFactory(bus, definition);
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.scheduler.JobSchedulerStore$MetaData

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.