Package org.apache.sirona

Examples of org.apache.sirona.SironaException


    @Override
    public double value() {
        try {
            return Number.class.cast(method.invoke(cache.getStatistics())).doubleValue();
        } catch (final Exception e) {
            throw new SironaException(e);
        }
    }
View Full Code Here


                            }
                        }
                        declaring = declaring.getSuperclass();
                    }
                } catch (final ClassNotFoundException e) {
                    throw new SironaException(e.getMessage(),e);
                }
            }
            return realMethod;
        }
View Full Code Here

    @Override
    public double value() {
        try {
            return Number.class.cast(SERVER.getAttribute(name, attribute)).doubleValue();
        } catch (final Exception e) {
            throw new SironaException(e);
        }
    }
View Full Code Here

        final T[] array = (T[]) Array.newInstance(api, split.length);
        for (int i = 0; i < array.length; i++) {
            try {
                array[i] = newInstance(api, split[i]);
            } catch (final Exception e) {
                throw new SironaException(e);
            }
        }
        return array;
    }
View Full Code Here

            }
            final T t = newInstance(clazz, config);
            SINGLETONS.put(clazz, t);
            return t;
        } catch (final Exception e) {
            throw new SironaException("Cannot find instance for class " + clazz.getName() + " with config : " //
                                          + config + " : " + e.getMessage(),e);
        }
    }
View Full Code Here

    public static <T> T processInstance(final T instance) {
        try {
            return internalProcessInstance(instance);
        } catch (final Exception e) {
            throw new SironaException(e);
        }
    }
View Full Code Here

        try {
            delegateClass = Class.class.cast(
                DelegatedCollectorGaugeDataStore.class.getClassLoader().loadClass( // use this classloader and not TCCL to avoid issues
                    Configuration.getProperty(Configuration.CONFIG_PROPERTY_PREFIX + "collector.gauge.store-class", InMemoryGaugeDataStore.class.getName())));
        } catch (final ClassNotFoundException e) {
            throw new SironaException(e.getMessage(),e);
        }
    }
View Full Code Here

            } catch (final Exception e) {
                // no-op: use default constructor
            }
            return delegateClass.newInstance();
        } catch (final Exception e) {
            throw new SironaException(e);
        }
    }
View Full Code Here

            while ((length = is.read(buffer)) != -1) {
                out.write(buffer, 0, length);
            }
            return new String(out.toByteArray());
        } catch (final IOException e) {
            throw new SironaException(e);
        } finally {
            // no need to close out
            try {
                if (is != null) {
                    is.close();
View Full Code Here

        }

        final String monStatus = filterConfig.getInitParameter(MONITOR_STATUS);
        if ((monStatus == null || "true".equalsIgnoreCase(monStatus))
                && filterConfig.getServletContext().getAttribute(GaugeDiscoveryListener.STATUS_GAUGES_ATTRIBUTE) == null) {
            throw new SironaException("To monitor status activate " + GaugeDiscoveryListener.class.getName());
        }

        statusGauges = (Map<Integer, StatusGauge>) filterConfig.getServletContext().getAttribute(GaugeDiscoveryListener.STATUS_GAUGES_ATTRIBUTE);
    }
View Full Code Here

TOP

Related Classes of org.apache.sirona.SironaException

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.