Package net.jini.jeri

Examples of net.jini.jeri.Endpoint


    }

    // inherit javadoc
    public void run() throws Exception {
        BasicObjectEndpoint boe;
        Endpoint ep = new FakeEndpoint(new FakeOutboundRequestIterator(
            new FakeOutboundRequest(),false));
        Uuid uuid = UuidFactory.create(1,2);

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


                //TcpEnpoint.
                //!!!This code assumes implementation detail: ObjectEnpoint
                //implementation class is BasicObjectEndpoint
                BasicObjectEndpoint oe = (BasicObjectEndpoint)
                    ((BasicInvocationHandler) handler).getObjectEndpoint();
                Endpoint ep = oe.getEndpoint();
                if (ep instanceof TcpEndpoint) {
                    //OK
                } else {
                    throw new TestException( "The Enpoint "
                        + " contained in the stub is not an instance"
View Full Code Here

        }
    }

    public Endpoint enumerateListenEndpoints(ServerEndpoint.ListenContext ctx)
        throws IOException {
        Endpoint e = null;
        TestListenEndpoint tle = new TestListenEndpoint(request, response);
        ListenCookie cookie = ctx.addListenEndpoint(tle);
        if (cookie.equals(tle.getListenHandle().getCookie())) {
            e = new TestEndpoint(request, response);
        }
View Full Code Here

    }

    //inherit javadoc
    public Endpoint enumerateListenEndpoints(ServerEndpoint.ListenContext ctx)
        throws IOException {
        Endpoint e = null;
        TestListenEndpoint tle = new TestListenEndpoint();
        ListenCookie cookie = ctx.addListenEndpoint(tle);
        if (cookie.equals(tle.getListenHandle().getCookie())) {
            e = new TestEndpoint(port, host);
        }
View Full Code Here

import java.util.Iterator;

public class NewRequestConflictingConstraintsTest extends AbstractEndpointTest{

    public void run() throws Exception {
        Endpoint endpoint = null;
        //Obtain endpoint
        ServerEndpoint serverEndpoint = getServerEndpoint();
        endpoint = serverEndpoint
            .enumerateListenEndpoints(new SETContext());
        //Obtain constraints
        InvocationConstraints conflictingConstraints =
            (InvocationConstraints) getConfigObject(
                InvocationConstraints.class, "conflictingConstraints");
        InvocationConstraints unsupportedConstraints =
            (InvocationConstraints) getConfigObject(
                InvocationConstraints.class, "unsupportedConstraints");
        boolean integritySupported = ((Boolean)getConfigObject(
            Boolean.class, "integritySupported")).booleanValue();
        //Verify conflicting constraints
        boolean exceptionThrown = false;
        try {
            OutboundRequestIterator it = endpoint
                .newRequest(conflictingConstraints);
            while (it.hasNext()) {
                OutboundRequest or = it.next();
                log.finest("Obtained " + or + " from " + endpoint);
            }
        } catch (UnsupportedConstraintException e){
            exceptionThrown = true;
        }
        if (!exceptionThrown) {
            throw new TestException("Conflicting constraints"
                + " did not generate an UnsupportedConstraintsException"
                + " for " + endpoint + ".newRequest()");
        }
        //Verify unsupported constraints
        exceptionThrown = false;
        try {
            OutboundRequestIterator it = endpoint
                .newRequest(conflictingConstraints);
            while (it.hasNext()) {
                OutboundRequest or = it.next();
                log.finest("Obtained " + or + " from " + endpoint);
            }
View Full Code Here

    public void run() throws Exception {
        //Start a listen opertation
        ServerSocket ss = new ServerSocket(getPort());
        acceptOneConnection(ss);
        Endpoint ep = getEndpoint();
        openClientConnection(ep);
        Socket connection = getConnection();
        if (connection==null) {
            throw new TestException("Unable to establish"
                + "client/server connection");
View Full Code Here

TOP

Related Classes of net.jini.jeri.Endpoint

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.