Package org.geotools.xacml.transport

Examples of org.geotools.xacml.transport.XACMLLocalTransportFactory


        synchronized (transportFactoryLock) {
            if (transportFactory != null)
                return transportFactory;
            transportFactory = GeoServerExtensions.bean(XACMLTransportFactory.class);
            if (transportFactory == null)
                transportFactory = new XACMLLocalTransportFactory(getPDP(), true);
            return transportFactory;
        }

    }
View Full Code Here


        synchronized (transportFactoryLock) {
            if (transportFactory != null)
                return transportFactory;
            transportFactory = GeoServerExtensions.bean(XACMLTransportFactory.class);
            if (transportFactory == null)
                transportFactory = new XACMLLocalTransportFactory(getPDP(), true);
            return transportFactory;
        }

    }
View Full Code Here

            Assert.fail(e.getMessage());
        }

        // serial

        XACMLTransport transport = new XACMLLocalTransportFactory(pdp, false).getXACMLTransport();
        ResponseCtx response = transport.evaluateRequestCtx(request);

        Result result = (Result) response.getResults().iterator().next();
        assertTrue(result.getDecision() == Result.DECISION_PERMIT);
        assertTrue(result.getStatus().getCode().iterator().next().equals(Status.STATUS_OK));

        // multithreaded transporter, one request

        transport = new XACMLLocalTransportFactory(pdp, true).getXACMLTransport();
        response = transport.evaluateRequestCtx(request);

        result = (Result) response.getResults().iterator().next();
        assertTrue(result.getDecision() == Result.DECISION_PERMIT);
        assertTrue(result.getStatus().getCode().iterator().next().equals(Status.STATUS_OK));
View Full Code Here

    public void testXACMLTransportMultipleRequestsSerial() {

        PDP pdp = TestSupport
                .getPDP(TestSupport.getGeoXACMLFNFor("wildcard", "WildCardPolicy.xml"));
        XACMLTransport transport = new XACMLLocalTransportFactory(pdp, false).getXACMLTransport();
        List<RequestCtx> requestList = createRequestList();
        List<ResponseCtx> responseList = transport.evaluateRequestCtxList(requestList);
        checkResponseList(responseList);

    }
View Full Code Here

    public void testXACMLTransportMultipleRequestsMultiThreaded() {

        PDP pdp = TestSupport
                .getPDP(TestSupport.getGeoXACMLFNFor("wildcard", "WildCardPolicy.xml"));
        XACMLTransport transport = new XACMLLocalTransportFactory(pdp, true).getXACMLTransport();
        List<RequestCtx> requestList = createRequestList();
        List<ResponseCtx> responseList = transport.evaluateRequestCtxList(requestList);
        checkResponseList(responseList);

    }
View Full Code Here

TOP

Related Classes of org.geotools.xacml.transport.XACMLLocalTransportFactory

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.