Package com.hazelcast.client

Examples of com.hazelcast.client.ClientEndpoint.sendResponse()


    @Override
    public final void process() throws Exception {
        ClientEndpoint endpoint = getEndpoint();
        try {
            Object result = call();
            endpoint.sendResponse(result, getCallId());
        } catch (Exception e) {
            clientEngine.getLogger(getClass()).warning(e);
            endpoint.sendResponse(e, getCallId());
        }
    }
View Full Code Here


        try {
            Object result = call();
            endpoint.sendResponse(result, getCallId());
        } catch (Exception e) {
            clientEngine.getLogger(getClass()).warning(e);
            endpoint.sendResponse(e, getCallId());
        }
    }
}
View Full Code Here

    public final void process() throws Exception {
        ClientEndpoint endpoint = getEndpoint();
        OperationFactory operationFactory = new OperationFactoryWrapper(createOperationFactory(), endpoint.getUuid());
        Map<Integer, Object> map = operationService.invokeOnAllPartitions(getServiceName(), operationFactory);
        Object result = reduce(map);
        endpoint.sendResponse(result, getCallId());
    }

    protected abstract OperationFactory createOperationFactory();

    protected abstract Object reduce(Map<Integer, Object> map);
View Full Code Here

        InvocationBuilder builder = operationService.createInvocationBuilder(getServiceName(), op, getTarget())
                .setTryCount(TRY_COUNT)
                .setResultDeserialized(false)
                .setCallback(new Callback<Object>() {
                    public void notify(Object object) {
                        endpoint.sendResponse(filter(object), getCallId());
                    }
                });
        builder.invoke();
    }
View Full Code Here

    public final void process() throws Exception {
        ClientEndpoint endpoint = getEndpoint();
        OperationFactory operationFactory = new OperationFactoryWrapper(createOperationFactory(), endpoint.getUuid());
        Map<Integer, Object> map = operationService.invokeOnPartitions(getServiceName(), operationFactory, getPartitions());
        Object result = reduce(map);
        endpoint.sendResponse(result, getCallId());
    }

    protected abstract OperationFactory createOperationFactory();

    protected abstract Object reduce(Map<Integer, Object> map);
View Full Code Here

        final Operation op = prepareOperation();
        op.setCallerUuid(endpoint.getUuid());
        final InvocationBuilder builder = operationService.createInvocationBuilder(getServiceName(), op, partitionId);
        builder.setTryCount(TRY_COUNT).setResultDeserialized(false).setCallback(new Callback<Object>() {
            public void notify(Object object) {
                endpoint.sendResponse(object, getCallId());
            }
        });
        builder.invoke();
    }
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.