Package net.jini.jeri

Examples of net.jini.jeri.BasicObjectEndpoint.newCall()


        // OutboundRequest.getResponseInputStream.read throws IOException

        fakeRequest.setResponseInputStream(
            new FakeInputStream(new IOException(),0));
        request = boe.newCall(InvocationConstraints.EMPTY).next();
        try {
            boe.executeCall(request);
            throw new AssertionError("executeCall() should fail");
        } catch (IOException ignore) {
        }
View Full Code Here


        // OutboundRequest.getResponseInputStream.read returns -1

        iterator.init();
        fakeRequest.setResponseInputStream(new FakeInputStream(null,-1));

        request = boe.newCall(InvocationConstraints.EMPTY).next();
        try {
            boe.executeCall(request);
            throw new AssertionError("executeCall() should fail");
        } catch (EOFException ignore) {
        }
View Full Code Here

        uuid = UuidFactory.create(1,2);
        endpoint = new FakeEndpoint(new FakeOutboundRequestIterator(null));
        boe = new BasicObjectEndpoint(endpoint,uuid,false);
        try {
            boe.newCall(null);
            throw new AssertionError("newCall(null) should fail");
        } catch (NullPointerException ignore) {}

        for (int i = 0; i < cases.length; i++) {
            logger.log(Level.FINE,"=================================");
View Full Code Here

            fakeIterator = new FakeOutboundRequestIterator(null);
            fakeIterator.setNextException(nextException);
            endpoint = new FakeEndpoint(fakeIterator);
            boe = new BasicObjectEndpoint(endpoint,uuid,false);

            iterator = boe.newCall(InvocationConstraints.EMPTY);
            try {
                iterator.next();
                throw new AssertionError("next() should fail");
            } catch (Throwable caught) {
                assertion(nextException.equals(caught),
View Full Code Here

            request.setRequestOutputStream(fos);
            fakeIterator = new FakeOutboundRequestIterator(request);
            endpoint = new FakeEndpoint(fakeIterator);
            boe = new BasicObjectEndpoint(endpoint,uuid,false);

            iterator = boe.newCall(InvocationConstraints.EMPTY);
            try {
                iterator.next();
                throw new AssertionError("next() should fail");
            } catch (Throwable caught) {
                assertion(nextException.equals(caught),
View Full Code Here

        FakeOutboundRequest request = new FakeOutboundRequest();
        BasicObjectEndpoint boe = new BasicObjectEndpoint(
             new FakeEndpoint(new FakeOutboundRequestIterator(request)),
             uuid,false);
        OutboundRequestIterator iterator =
            boe.newCall(InvocationConstraints.EMPTY);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": hasNext returns true");
        logger.log(Level.FINE,"");
View Full Code Here

            + ": reading response input stream returns 0x00");
        logger.log(Level.FINE,"");

        iterator.init();
        fakeRequest.setResponseInputStream(new FakeInputStream(null,0x00));
        request = boe.newCall(InvocationConstraints.EMPTY).next();
        assertion(
            boe.executeCall(request) instanceof NoSuchObjectException);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
View Full Code Here

            + ": reading response input stream returns 0x01");
        logger.log(Level.FINE,"");

        iterator.init();
        fakeRequest.setResponseInputStream(new FakeInputStream(null,0x01));
        request = boe.newCall(InvocationConstraints.EMPTY).next();
        assertion(boe.executeCall(request) == null);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": reading response input stream returns 0x02");
View Full Code Here

            + ": reading response input stream returns 0x02");
        logger.log(Level.FINE,"");

        iterator.init();
        fakeRequest.setResponseInputStream(new FakeInputStream(null,0x02));
        request = boe.newCall(InvocationConstraints.EMPTY).next();
        assertion(
            boe.executeCall(request) instanceof UnmarshalException);
    }

    // inherit javadoc
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.