Package org.apache.cayenne.remote

Examples of org.apache.cayenne.remote.ClientChannel


                        else {
                            return new GenericResponse(Arrays.asList(inflated));
                        }
                    }
                });
        ClientChannel channel = new ClientChannel(
                connection,
                false,
                new MockEventManager(),
                false);
View Full Code Here


    ClientConnection connection = new HessianConnection(
        "http://localhost:8080/cayenne-service", "cayenne-user",
        "secret", null);

    DataChannel channel = new ClientChannel(connection);

    ObjectContext context = new CayenneContext(channel);

    // cleans up all data, so that we start with empty database on each
    // tutorial run
View Full Code Here

        inflated.setObjectId(gid);
        inflated.setGlobalAttribute1("abc");

        MockClientConnection connection = new MockClientConnection(new GenericResponse(
                Arrays.asList(inflated)));
        ClientChannel channel = new ClientChannel(
                connection,
                false,
                new MockEventManager(),
                false);
View Full Code Here

        inflated.setObjectId(gid);
        inflated.setGlobalAttribute1("abc");

        MockClientConnection connection = new MockClientConnection(new GenericResponse(
                Arrays.asList(inflated)));
        ClientChannel channel = new ClientChannel(
                connection,
                false,
                new MockEventManager(),
                false);
View Full Code Here

    protected ObjectContext createObjectContext() {
        // wrap ClientServerChannel in LocalConnection to enable logging...
        ClientConnection connector = new LocalConnection(new ClientServerChannel(
                getDomain()), LocalConnection.HESSIAN_SERIALIZATION);
        return new CayenneContext(new ClientChannel(connector));
    }
View Full Code Here

                    MtTable1.class,
                    new ClientChannelServerDiffsListener1(),
                    "prePersist");

            ClientServerChannel csChannel = new ClientServerChannel(getDomain());
            ClientChannel channel = new ClientChannel(new LocalConnection(csChannel));
            CayenneContext context = new CayenneContext(channel);
            ClientMtTable1 o = context.newObject(ClientMtTable1.class);
            o.setServerAttribute1("YY");
            context.commitChanges();
View Full Code Here

                    MtTable1.class,
                    new ClientChannelServerDiffsListener1(),
                    "preUpdate");

            ClientServerChannel csChannel = new ClientServerChannel(getDomain());
            ClientChannel channel = new ClientChannel(new LocalConnection(csChannel));
            CayenneContext context = new CayenneContext(channel);
            ClientMtTable1 o = context.newObject(ClientMtTable1.class);
            o.setServerAttribute1("YY");
            context.commitChanges();
View Full Code Here

                    MtTable1.class,
                    new ClientChannelServerDiffsListener1(),
                    "prePersist");

            ClientServerChannel csChannel = new ClientServerChannel(getDomain());
            ClientChannel channel = new ClientChannel(new LocalConnection(csChannel));
            CayenneContext context = new CayenneContext(channel);
            ClientMtTable1 o = context.newObject(ClientMtTable1.class);
            ClientMtTable2 o1 = context.newObject(ClientMtTable2.class);
            o.addToTable2Array(o1);
            context.commitChanges();
View Full Code Here

                    MtTable1.class,
                    new ClientChannelServerDiffsListener1(),
                    "prePersistAddRelationship");

            ClientServerChannel csChannel = new ClientServerChannel(getDomain());
            ClientChannel channel = new ClientChannel(new LocalConnection(csChannel));
            CayenneContext context = new CayenneContext(channel);
            ClientMtTable1 o = context.newObject(ClientMtTable1.class);
            ClientMtTable2 o1 = context.newObject(ClientMtTable2.class);
            o.addToTable2Array(o1);
            context.commitChanges();
View Full Code Here

    }

    private CayenneContext createClientContext() {
        ClientServerChannel serverChannel = new ClientServerChannel(getDomain());
        LocalConnection connection = new LocalConnection(serverChannel);
        ClientChannel clientChannel = new ClientChannel(connection);
        return new CayenneContext(clientChannel);
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.remote.ClientChannel

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.