Package org.activemq.transport

Examples of org.activemq.transport.TransportStatusEvent


        this.dataOut = new DataOutputStream(buffOut);
        System.out.println("Creating print writer...");
        PrintWriter writer = new PrintWriter(socket.getOutputStream());
        getJabberWireFormat().setWriter(writer);
        System.out.println("Firing event");
        fireStatusEvent(new TransportStatusEvent(this, TransportStatusEvent.CONNECTED));
    }
View Full Code Here


                setTransportConnected(false);
                if (ex instanceof EOFException) {
                    if (!isServerSide() && !isUsedInternally()){
                        log.warn("Peer closed connection", ex);
                    }
                    fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
                    onAsyncException(JMSExceptionHelper.newJMSException("Error reading socket: " + ex, ex));
                }
                else {
                    fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
                    onAsyncException(JMSExceptionHelper.newJMSException("Error reading socket: " + ex, ex));
                }
            }
            stop();
        }
View Full Code Here

    protected void initializeStreams() throws IOException{
        BufferedInputStream buffIn = new BufferedInputStream(socket.getInputStream(),8192);
        this.dataIn = new DataInputStream(buffIn);
        TcpBufferedOutputStream buffOut = new TcpBufferedOutputStream(socket.getOutputStream(),8192);
        this.dataOut = new DataOutputStream(buffOut);
        fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.CONNECTED));
    }
View Full Code Here

        log.debug("Forcing disconnect");
        if (socket != null && socket.isConnected()) {
            socket.close();
        }
        setTransportConnected(false);
        fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
    }
View Full Code Here

                thread.start();
                //send the wire format
                if (!isServerSide()) {
                    getWireFormat().initiateClientSideProtocol();
                }
        fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.CONNECTED));
            }
            catch (EOFException e) {
                doClose(e);
            }
            catch (IOException e) {
View Full Code Here

                setTransportConnected(false);
                if (ex instanceof EOFException) {
                    if (!isServerSide() && !isUsedInternally()){
                        log.warn("Peer closed connection", ex);
                    }
                    fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
                    onAsyncException(JMSExceptionHelper.newJMSException("Error reading socket: " + ex, ex));
                }
                else {
                    fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
                    onAsyncException(JMSExceptionHelper.newJMSException("Error reading socket: " + ex, ex));
                }
            }
            stop();
        }
View Full Code Here

//                    } catch (JMSException e) {
//                        if(getExceptionListener()!=null) {
//                            getExceptionListener().onException(e);
//                        }
//                    }
                    fireStatusEvent(new TransportStatusEvent(CompositeTransportChannel.this,TransportStatusEvent.CONNECTED));
//                }
//            }.start();
        }
    }
View Full Code Here

        log.debug("Forcing disconnect");
        if (socket != null && socket.isConnected()) {
            socket.close();
        }
        setTransportConnected(false);
        fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
    }
View Full Code Here

                    log.warn("Peer closed connection", ex);
                }
                else {
                    onAsyncException(JMSExceptionHelper.newJMSException("Error reading socket: " + ex, ex));
                }
                fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
            }
            stop();
        }
    }
View Full Code Here

                setTransportConnected(false);
                if (ex instanceof EOFException) {
                    if (!isServerSide() && !isUsedInternally()){
                        log.warn("Peer closed connection", ex);
                    }
                    fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
                }
                else {
                    fireStatusEvent(new TransportStatusEvent(this,TransportStatusEvent.DISCONNECTED));
                    onAsyncException(JMSExceptionHelper.newJMSException("Error reading socket: " + ex, ex));
                }
            }
            stop();
        }
View Full Code Here

TOP

Related Classes of org.activemq.transport.TransportStatusEvent

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.