Package javax.ws.rs

Examples of javax.ws.rs.ServiceUnavailableException


        return roleController.list();
    }

    @Override
    public List<RoleTO> list(final int page, final int size) {
        throw new ServiceUnavailableException();
    }
View Full Code Here


    public synchronized void handleTimeout() {
        if (!resumedByApplication) {
            if (timeoutHandler != null) {
                timeoutHandler.handleTimeout(this);
            } else {
                cont.setObject(new ServiceUnavailableException());
            }
        }
    }
View Full Code Here

        return Arrays.asList(getRestTemplate().getForObject(baseUrl + "role/list.json", RoleTO[].class));
    }

    @Override
    public List<RoleTO> list(final int page, final int size) {
        throw new ServiceUnavailableException();
    }
View Full Code Here

        return roleController.list();
    }

    @Override
    public List<RoleTO> list(final int page, final int size) {
        throw new ServiceUnavailableException();
    }
View Full Code Here

    @Path("sync/{echo}")
    public String syncEcho(@PathParam("echo") final String echo) {
        try {
            Thread.sleep(SLEEP_TIME_IN_MILLIS);
        } catch (InterruptedException ex) {
            throw new ServiceUnavailableException();
        }
        return echo;
    }
View Full Code Here

                    break;
                case INTERNAL_SERVER_ERROR:
                    webAppException = new InternalServerErrorException(response);
                    break;
                case SERVICE_UNAVAILABLE:
                    webAppException = new ServiceUnavailableException(response);
                    break;
                default:
                    final Response.Status.Family statusFamily = response.getStatusInfo().getFamily();
                    webAppException = createExceptionForFamily(response, statusFamily);
            }
View Full Code Here

    public synchronized void handleTimeout() {
        if (!resumedByApplication) {
            if (timeoutHandler != null) {
                timeoutHandler.handleTimeout(this);
            } else {
                cont.setObject(new ServiceUnavailableException());
            }
        }
    }
View Full Code Here

            // decide the reconnect handling strategy based on current reconnect delay value.
            final long delay = reconnectDelay;
            if (delay > 0) {
                LOGGER.info("Non-zero reconnect delay [" + delay + "] - responding with HTTP 503.");
                throw new ServiceUnavailableException(delay);
            } else {
                LOGGER.info("Zero reconnect delay - reconnecting.");
                replayMissedEvents(lastEventId, eventOutput);
            }
        }

        if (!broadcaster.add(eventOutput)) {
            LOGGER.severe("!!! Unable to add new event output to the broadcaster !!!");
            // let's try to force a 5s delayed client reconnect attempt
            throw new ServiceUnavailableException(5L);
        }

        return eventOutput;
    }
View Full Code Here

                    break;
                case INTERNAL_SERVER_ERROR:
                    webAppException = new InternalServerErrorException(response);
                    break;
                case SERVICE_UNAVAILABLE:
                    webAppException = new ServiceUnavailableException(response);
                    break;
                default:
                    final Response.Status.Family statusFamily = response.getStatusInfo().getFamily();
                    webAppException = createExceptionForFamily(response, statusFamily);
            }
View Full Code Here

    @Path("sync/{echo}")
    public String syncEcho(@PathParam("echo") final String echo) {
        try {
            Thread.sleep(SLEEP_TIME_IN_MILLIS);
        } catch (final InterruptedException ex) {
            throw new ServiceUnavailableException();
        }
        return echo;
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.ServiceUnavailableException

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.