Examples of AlarmCallbackException


Examples of org.graylog2.plugin.alarms.callbacks.AlarmCallbackException

            final URL url = new URL(configuration.getString(CK_URL));
            r = asyncHttpClient.preparePost(url.toString())
                    .setBody(body)
                    .execute().get();
        } catch (JsonProcessingException e) {
            throw new AlarmCallbackException("Unable to serialize alarm", e);
        } catch (MalformedURLException e) {
            throw new AlarmCallbackException("Malformed URL", e);
        } catch (IOException | InterruptedException | ExecutionException e) {
            throw new AlarmCallbackException(e.getMessage(), e);
        }

        if (r.getStatusCode() != 200) {
            throw new AlarmCallbackException("Expected ping HTTP response [200] but got [" + r.getStatusCode() + "].");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.