Package com.jitlogic.zorka.common.zico

Examples of com.jitlogic.zorka.common.zico.ZicoPacket


     * @throws IOException if connection breaks, client authentication error or other error occurs
     */
    public void hello(String hostname, String auth) throws IOException {
        send(ZICO_HELLO, ZicoCommonUtil.pack(
                new HelloRequest(System.currentTimeMillis(), hostname, auth)));
        ZicoPacket pkt = recv();
        switch (pkt.getStatus()) {
            case ZICO_OK:
                return;
            case ZICO_AUTH_ERROR:
                throw new ZicoException(ZICO_AUTH_ERROR, "Authentication error.");
            default:
                throw new ZicoException(pkt.getStatus(), "Other error: status=" + pkt.getStatus());
        }
    }
View Full Code Here


        ByteArrayOutputStream os = new ByteArrayOutputStream();
        FressianWriter writer = new FressianWriter(os, FressianTraceFormat.WRITE_LOOKUP);
        writer.writeObject(data);
        writer.close();
        send(ZICO_DATA, ZicoCommonUtil.pack(data));
        ZicoPacket pkt = recv();
        if (pkt.getStatus() != ZICO_OK) {
            throw new ZicoException(pkt.getStatus(), "ZICO submission error: status=" + pkt.getStatus());
        }
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.common.zico.ZicoPacket

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.