Package com.hazelcast.client.impl.client

Examples of com.hazelcast.client.impl.client.ClientPrincipal


    @Test
    public void testPacket_writeAndRead() {
        SerializationService ss = createSerializationService(10);

        UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("test", "pass");
        ClientPrincipal principal = new ClientPrincipal("uuid", "uuid2");
        Data data = ss.toData(new AuthenticationRequest(credentials, principal));

        Packet packet = new Packet(data, ss.getPortableContext());
        ByteBuffer buffer = ByteBuffer.allocate(1024);
        assertTrue(packet.writeTo(buffer));
View Full Code Here


        ClientEngineImpl service = getService();
        String memberUuid = getCallerUuid();
        ClientEngineImpl engine = getService();
        Set<ClientEndpoint> endpoints = engine.getEndpointManager().getEndpoints(clientUuid);
        for (ClientEndpoint endpoint : endpoints) {
            ClientPrincipal principal = new ClientPrincipal(clientUuid, memberUuid);
            endpoint.authenticated(principal);
        }
        service.addOwnershipMapping(clientUuid, memberUuid);
    }
View Full Code Here

        return address;
    }

    @Override
    public String getUuid() {
        final ClientPrincipal cp = principal;
        return cp != null ? cp.getUuid() : null;
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.client.impl.client.ClientPrincipal

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.