Examples of FilterContext


Examples of com.sun.enterprise.admin.wsmgmt.filter.spi.FilterContext

    public void processRequest(String messageID, com.sun.enterprise.webservice.SOAPMessageContext  context,
        TransportInfo info) {
        com.sun.enterprise.admin.wsmgmt.SOAPMessageContext smc =
            new com.sun.enterprise.admin.wsmgmt.SOAPMessageContext_2_0(context);

         FilterContext fc = (FilterContext) msgId2fc.get(messageID);
        fc.setTransportInfo(info);
        fc.setMessageContext(smc);
        FilterRouter.getInstance().applyFilters(Filter.PROCESS_REQUEST,fc);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.wsmgmt.filter.spi.FilterContext

     * @param messageID - returned by preProcessRequest call
     * @param context - the jaxrpc message trace, transport dependent.
     */
    public void processResponse(String messageID, com.sun.enterprise.webservice.SOAPMessageContext  context) {
        String ep = null;
        FilterContext fc = (FilterContext) msgId2fc.get(messageID);
        FilterRouter.getInstance().applyFilters(Filter.PROCESS_RESPONSE,fc);
    }
View Full Code Here

Examples of org.apache.fulcrum.json.jackson.filters.FilterContext

        return serializeAllExceptFilter(src, filterClass, false, filterAttr);
    }

    public synchronized <T> String serializeAllExceptFilter(Object src,
            Class<T> filterClass, Boolean clean, String... filterAttr) throws Exception {
        FilterContext fc = new FilterContext();
        if (filterAttr != null)
            fc.setFilter(SimpleBeanPropertyFilter
                    .serializeAllExcept(filterAttr));
        return filter(src, filterClass, fc, clean, filterAttr);
    }
View Full Code Here

Examples of org.apache.fulcrum.json.jackson.filters.FilterContext

    }

    @Override
    public synchronized <T> String serializeOnlyFilter(Object src,
            Class<T> filterClass, Boolean refresh, String... filterAttr) throws Exception {
        FilterContext fc = new FilterContext();
        if (filterAttr != null && filterAttr.length > 0) {
            fc.setFilter(SimpleBeanPropertyFilter.filterOutAllExcept(filterAttr));
            getLogger().debug("setting filteroutAllexcept filter for size of filterAttr: " + filterAttr.length);
        }
        return filter(src, filterClass, fc, refresh, filterAttr);
    }
View Full Code Here

Examples of org.asynchttpclient.filter.FilterContext

            AsyncHandler<?> handler, //
            HttpResponseStatus status,//
            HttpResponseHeaders responseHeaders) throws IOException {

        if (hasResponseFilters) {
            FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(future.getRequest())
                    .responseStatus(status).responseHeaders(responseHeaders).build();

            for (ResponseFilter asyncFilter : config.getResponseFilters()) {
                try {
                    fc = asyncFilter.filter(fc);
                    // FIXME Is it worth protecting against this?
                    if (fc == null) {
                        throw new NullPointerException("FilterContext is null");
                    }
                } catch (FilterException efe) {
                    requestSender.abort(channel, future, efe);
                }
            }

            // The handler may have been wrapped.
            future.setAsyncHandler(fc.getAsyncHandler());

            // The request has changed
            if (fc.replayRequest()) {
                requestSender.replayRequest(future, fc, channel);
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.asynchttpclient.filter.FilterContext

        final AsyncHandler handler = context.getHandler();
        final GrizzlyResponseHeaders responseHeaders = new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader);
        if (context.getProvider().getClientConfig().hasResponseFilters()) {
            final List<ResponseFilter> filters = context.getProvider().getClientConfig().getResponseFilters();
            FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(context.getRequest())
                    .responseHeaders(responseHeaders).responseStatus(context.getResponseStatus()).build();
            try {
                for (int i = 0, len = filters.size(); i < len; i++) {
                    final ResponseFilter f = filters.get(i);
                    fc = f.filter(fc);
                }
            } catch (Exception e) {
                context.abort(e);
            }
            if (fc.replayRequest()) {
                httpHeader.setSkipRemainder(true);
                final Request newRequest = fc.getRequest();
                final AsyncHandler newHandler = fc.getAsyncHandler();
                try {
                    final ConnectionManager m = context.getProvider().getConnectionManager();
                    final Connection c = m.obtainConnection(newRequest, context.getFuture());
                    final HttpTxContext newContext = context.copy();
                    newContext.setRequest(newRequest);
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.