All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.launchdarkly.eventsource.StreamHttpErrorException Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package com.launchdarkly.eventsource;

/**
 * An exception indicating that the remote server returned an HTTP error.
 * 

* {@link HttpConnectStrategy} defines an error as any non-2xx status. *

* See {@link StreamException} for more about EventSource's exception behavior. * * @since 4.0.0 */ @SuppressWarnings("serial") public class StreamHttpErrorException extends StreamException { private final int code; /** * Constructs an instance. * @param code the HTTP status */ public StreamHttpErrorException(int code) { super("Server returned HTTP error " + code); this.code = code; } /** * Returns the HTTP status code. * @return the HTTP status */ public int getCode() { return code; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy