Examples of FleaseMessage


Examples of org.xtreemfs.foundation.flease.comm.FleaseMessage

    @Override
    public ErrorResponse parseRPCMessage(Request rq) {
        ErrorResponse resp = super.parseRPCMessage(rq);
       
        if (resp == null) {
            FleaseMessage message = new FleaseMessage(rq.getData());
            FLease rpcrq = (FLease) rq.getRequestMessage();
            assert (message != null);
           
            InetSocketAddress sender;
            try {
                sender = new InetSocketAddress(InetAddress.getByAddress(rpcrq.getHost().getBytes()),
                                                                        rpcrq.getPort());
            } catch (UnknownHostException e) {
                return ErrorResponse.newBuilder().setErrorMessage(e.getMessage())
                                                 .setErrorType(ErrorType.IO_ERROR)
                                                 .setDebugInfo(OutputUtils.stackTraceToString(e))
                                                 .build();
            }
            assert (sender != null);
            message.setSender(sender);
           
            rq.setAttachment(message);
        }
       
        return resp;
View Full Code Here

Examples of org.xtreemfs.foundation.flease.comm.FleaseMessage

     * @see org.xtreemfs.babudb.replication.transmission.dispatcher.Operation#
     *          processRequest(org.xtreemfs.babudb.replication.transmission.dispatcher.Request)
     */
    @Override
    public void processRequest(Request rq) {
        FleaseMessage msg = (FleaseMessage) rq.getAttachment();

        Logging.logMessage(Logging.LEVEL_DEBUG, this, "FleaseOperation: received message %s",
                msg.toString());
       
        receiver.receive(msg);
        rq.sendSuccess(ErrorCodeResponse.getDefaultInstance());
    }
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.