Examples of ResponseCallback


Examples of org.hypertable.AsyncComm.ResponseCallback

        mComm = comm;
        mBroker = broker;
    }

    public void run() {
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);
        int fd = mEvent.payload.getInt();
        mBroker.Flush(cb, fd);
    }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        super(event);
        mComm = comm;
    }

    public void run() {
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);
        cb.response_ok();
    }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        mBroker = broker;
    }

    public void run() {
        int     command;
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);

        try {

            if (mEvent.payload.remaining() < 4)
                throw new ProtocolException("Truncated message");

            command = mEvent.payload.getInt();

            byte [] params = new byte [ mEvent.payload.remaining() ];
            mEvent.payload.get(params);

            mBroker.Debug(cb, command, params);
        }
        catch (ProtocolException e) {
            int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
            log.severe("Protocol error (DEBUG) - " + e.getMessage());
            if (error != Error.OK)
                log.severe("Problem sending (DEBUG) error back to client - "
                           + Error.GetText(error));
        }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        mBroker = broker;
    }

    public void run() {
        String  fileName;
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);

        try {

            if ((fileName = Serialization.DecodeString(mEvent.payload)) == null)
                throw new ProtocolException(
                    "Filename not properly encoded in request packet");

            mBroker.Remove(cb, fileName);

        }
        catch (ProtocolException e) {
            int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
            log.severe("Protocol error (REMOVE) - " + e.getMessage());
            if (error != Error.OK)
                log.severe("Problem sending (REMOVE) error back to client - "
                           + Error.GetText(error));
        }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        mBroker = broker;
    }

    public void run() {
        String  src, dst;
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);

        try {

            if ((src = Serialization.DecodeString(mEvent.payload)) == null ||
                (dst = Serialization.DecodeString(mEvent.payload)) == null)
                throw new ProtocolException("Error decoding filenames");

            mBroker.Rename(cb, src, dst);
        }
        catch (ProtocolException e) {
            int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
            log.severe("Protocol error (Rename) - " + e.getMessage());
            if (error != Error.OK)
                log.severe("Problem sending (Rename) error back to client - "
                           + Error.GetText(error));
        }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        mBroker = broker;
    }

    public void run() {
        String  fileName;
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);

        try {

            if ((fileName = Serialization.DecodeString(mEvent.payload)) == null)
                throw new ProtocolException(
                    "Filename not properly encoded in request packet");

            mBroker.Mkdirs(cb, fileName);
        }
        catch (ProtocolException e) {
            int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
            log.severe("Protocol error (MKDIRS) - " + e.getMessage());
            if (error != Error.OK)
                log.severe("Problem sending (MKDIRS) error back to client - "
                           + Error.GetText(error));
        }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        mBroker = broker;
    }

    public void run() {
        String  fileName;
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);

        try {

            if ((fileName = Serialization.DecodeString(mEvent.payload)) == null)
                throw new ProtocolException(
                    "Filename not properly encoded in request packet");

            mBroker.Rmdir(cb, fileName);
        }
        catch (ProtocolException e) {
            int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
            log.severe("Protocol error (RMDIR) - " + e.getMessage());
            if (error != Error.OK)
                log.severe("Problem sending (RMDIR) error back to client - "
                           + Error.GetText(error));
        }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        mBroker = broker;
    }

    public void run() {
        int     fd;
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);

        try {

            if (mEvent.payload.remaining() < 4)
                throw new ProtocolException("Truncated message");

            fd = mEvent.payload.getInt();

            mBroker.Close(cb, fd);

        }
        catch (ProtocolException e) {
            int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
            log.severe("Protocol error (CLOSE) - " + e.getMessage());
            if (error != Error.OK)
                log.severe("Problem sending (CLOSE) error back to client - "
                           + Error.GetText(error));
        }
View Full Code Here

Examples of org.hypertable.AsyncComm.ResponseCallback

        mComm = comm;
        mAppQueue = appQueue;
    }

    public void run() {
        ResponseCallback cb = new ResponseCallback(mComm, mEvent);

        try {

            if (mEvent.payload.remaining() < 2)
                throw new ProtocolException("Truncated message");

            short flags = mEvent.payload.getShort();

            if ((flags & Protocol.SHUTDOWN_FLAG_IMMEDIATE) != 0) {
                log.info("Immediate shutdown.");
                System.exit(0);
            }

            mAppQueue.Shutdown();

            cb.response_ok();

            wait(2000);

            System.exit(0);

        }
        catch (ProtocolException e) {
            int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
            log.severe("Protocol error (SHUTDOWN) - " + e.getMessage());
            if (error != Error.OK)
                log.severe("Problem sending (SHUTDOWN) error back to client - "
                           + Error.GetText(error));
        }
View Full Code Here

Examples of org.objectweb.celtix.bindings.ResponseCallback

        endpointRef = new EndpointReferenceType();
        EndpointReferenceUtils.setServiceAndPortName(endpointRef,
                                                     new QName("http://objectweb.org/hello_world_soap_http",
                                                               "Greeter"),
                                                               "SOAPPort")
        ResponseCallback responseCallback = EasyMock.createMock(ResponseCallback.class);
        clientBinding.createResponseCallback();
        EasyMock.expectLastCall().andReturn(responseCallback);
        EasyMock.replay(clientBinding);

    }
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.