Package javax.ws.rs

Examples of javax.ws.rs.NotFoundException


    @Ignore
    public static class NotFoundResponseExceptionMapper implements ResponseExceptionMapper<Exception> {
       
        public Exception fromResponse(Response r) {
            if (r.getStatus() == HttpStatus.SC_NOT_FOUND) {
                return new NotFoundException();
            } else {
                return null;
            }
        }
View Full Code Here


                                                   message.get(Message.REQUEST_URI),
                                                   rawPath);
            LOG.warning(errorMsg.toString());
            Response resp = JAXRSUtils.createResponse(resources, message, errorMsg.toString(),
                    Response.Status.NOT_FOUND.getStatusCode(), false);
            throw new NotFoundException(resp);
        }

        MultivaluedMap<String, String> matchedValues = new MetadataMap<String, String>();
               
        OperationResourceInfo ori = null;    
View Full Code Here

                //  For path, query & matrix parameters this is 404,
                //  for others 400...
                //
                if (pType == ParameterType.PATH || pType == ParameterType.QUERY
                    || pType == ParameterType.MATRIX) {
                    throw new NotFoundException(nfe);
                }
                throw new BadRequestException(nfe);
            }
        }
       
View Full Code Here

                    org.apache.cxf.common.i18n.Message errorM =
                        new org.apache.cxf.common.i18n.Message("NO_SUBRESOURCE_FOUND",
                                                               BUNDLE,
                                                               subResourcePath);
                    LOG.severe(errorM.toString());
                    throw new NotFoundException();
                }

                OperationResourceInfo subOri = JAXRSUtils.findTargetMethod(
                                                         Collections.singletonMap(subCri, values),
                                                         inMessage,
View Full Code Here

            org.apache.cxf.common.i18n.Message errorM =
                new org.apache.cxf.common.i18n.Message("NULL_SUBRESOURCE",
                                                       BUNDLE,
                                                       subResourcePath);
            LOG.info(errorM.toString());
            throw new NotFoundException();
        }

        return result;
    }
View Full Code Here

                try {
                    Thread.sleep(2000);
                } catch (InterruptedException ex) {
                    // ignore
                }      
                response.resume(new NotFoundException());
            }
        });
       
    }
View Full Code Here

    @Ignore
    public static class NotFoundResponseExceptionMapper implements ResponseExceptionMapper<Exception> {
       
        public Exception fromResponse(Response r) {
            if (r.getStatus() == HttpStatus.SC_NOT_FOUND) {
                return new NotFoundException();
            } else {
                return null;
            }
        }
View Full Code Here

        if (list.size() == 0) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("NO_RESOURCES_AVAILABLE",
                                                       BUNDLE);
            LOG.severe(msg.toString());
            throw new NotFoundException();
        }
    }
View Full Code Here

                    org.apache.cxf.common.i18n.Message errorM =
                        new org.apache.cxf.common.i18n.Message("NO_SUBRESOURCE_FOUND",
                                                               BUNDLE,
                                                               subResourcePath);
                    LOG.severe(errorM.toString());
                    throw new NotFoundException();
                }

                OperationResourceInfo subOri = JAXRSUtils.findTargetMethod(subCri,
                                                         inMessage,
                                                         httpMethod,
View Full Code Here

            org.apache.cxf.common.i18n.Message errorM =
                new org.apache.cxf.common.i18n.Message("NULL_SUBRESOURCE",
                                                       BUNDLE,
                                                       subResourcePath);
            LOG.info(errorM.toString());
            throw new NotFoundException();
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.NotFoundException

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.