Examples of ZicoPacket


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

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

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