Package com.sun.messaging.jmq.transport.httptunnel

Examples of com.sun.messaging.jmq.transport.httptunnel.HttpTunnelConnection


    private void handleConnInitAck(HttpTunnelPacket p) {
        if (conn != null) {
            return;
        }

        conn = new HttpTunnelConnection(connId, this);
    }
View Full Code Here


        try {
            dos.writeUTF(serviceName);
            dos.writeInt(connTable.size());

            for (Enumeration e = connTable.elements(); e.hasMoreElements();) {
                HttpTunnelConnection conn = (HttpTunnelConnection) e.nextElement();
                dos.writeInt(conn.getConnId());
                dos.writeInt(conn.getPullPeriod());
            }

            dos.flush();
            bos.flush();
        } catch (Exception e) {
View Full Code Here

            for (Enumeration e = connTable.keys(); e.hasMoreElements();) {
                connids.addElement((String) e.nextElement());
            }
        }

        HttpTunnelConnection conn;
        HttpTunnelPacket pkt;
        String connId;

        for (int i = connids.size() - 1; i >= 0; i--) {
            connId = (String) connids.elementAt(i);
            conn = (HttpTunnelConnection) connTable.get(connId);

            if (conn != null) {
                pkt = genAbortPacket(conn.getConnId());
                receivePacket(pkt);
            }
        }

        connTable.clear();
View Full Code Here

            }
            try {
                dis.close();
            } catch (Exception e) {}
        }
        HttpTunnelConnection conn = new HttpTunnelConnection(connId, this);
        conn.setRemoteAddr(remoteip);

        synchronized (connTable) {
            connTable.put(Integer.toString(connId), conn);
        }
View Full Code Here

     * Handle connection close request.
     */
    private void handleConnClose(HttpTunnelPacket p) {
        int connId = p.getConnId();

        HttpTunnelConnection conn;

        synchronized (connTable) {
            conn = (HttpTunnelConnection) connTable.get(Integer.toString(connId));
        }

        if (conn == null) {
            return;
        }

        conn.handleClose(p);
    }
View Full Code Here

     * Handle connection close request.
     */
    private void handleConnAbort(HttpTunnelPacket p) {
        int connId = p.getConnId();

        HttpTunnelConnection conn;

        synchronized (connTable) {
            conn = (HttpTunnelConnection) connTable.get(Integer.toString(connId));
        }

        if (conn == null) {
            return;
        }

        conn.handleAbort(p);
    }
View Full Code Here

     * Handle connection close request.
     */
    private void handleConnOption(HttpTunnelPacket p) {
        int connId = p.getConnId();

        HttpTunnelConnection conn;

        synchronized (connTable) {
            conn = (HttpTunnelConnection) connTable.get(Integer.toString(connId));
        }

        if (conn == null) {
            return;
        }

        conn.handleConnOption(p);
    }
View Full Code Here

     * Handles data packets from the network.
     */
    private void handlePacket(HttpTunnelPacket p) {
        int connId = p.getConnId();

        HttpTunnelConnection conn;

        synchronized (connTable) {
            conn = (HttpTunnelConnection) connTable.get(Integer.toString(connId));
        }

        if (conn == null) {
            // TBD : Error - Tell the client ???
            return;
        }

        conn.receivePacket(p, false);
    }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.transport.httptunnel.HttpTunnelConnection

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.