Java 类org.jivesoftware.smack.util.ObservableReader 实例源码

项目:Smack    文件:SLF4JSmackDebugger.java   
/**
 * Create new SLF4J Smack Debugger instance
 * @param connection Smack connection to debug
 * @param writer connection data writer to observe
 * @param reader connection data reader to observe
 */
public SLF4JSmackDebugger(XMPPConnection connection, Writer writer, Reader reader) {
    this.connection = connection;
    this.writer = new ObservableWriter(writer);
    this.writer.addWriterListener(slf4JRawXmlListener);
    this.reader = new ObservableReader(Validate.notNull(reader));
    this.reader.addReaderListener(slf4JRawXmlListener);
    this.connection.addConnectionListener(new SLF4JLoggingConnectionListener(connection, logger));
}
项目:Smack    文件:AbstractDebugger.java   
public Reader newConnectionReader(Reader newReader) {
    reader.removeReaderListener(readerListener);
    ObservableReader debugReader = new ObservableReader(newReader);
    debugReader.addReaderListener(readerListener);
    reader = debugReader;
    return reader;
}
项目:Smack    文件:EnhancedDebugger.java   
public Reader newConnectionReader(Reader newReader) {
    ((ObservableReader) reader).removeReaderListener(readerListener);
    ObservableReader debugReader = new ObservableReader(newReader);
    debugReader.addReaderListener(readerListener);
    reader = debugReader;
    return reader;
}
项目:Smack    文件:EnhancedDebugger.java   
/**
 * Stops debugging the connection. Removes any listener on the connection.
 */
void cancel() {
    connection.removeConnectionListener(connListener);
    connection.removeAsyncStanzaListener(packetReaderListener);
    connection.removePacketSendingListener(packetWriterListener);
    ((ObservableReader) reader).removeReaderListener(readerListener);
    ((ObservableWriter) writer).removeWriterListener(writerListener);
    messagesTable = null;
}
项目:Smack    文件:LiteDebugger.java   
public Reader newConnectionReader(Reader newReader) {
    ((ObservableReader)reader).removeReaderListener(readerListener);
    ObservableReader debugReader = new ObservableReader(newReader);
    debugReader.addReaderListener(readerListener);
    reader = debugReader;
    return reader;
}
项目:androidpn_enhanced_client    文件:AndroidDebugger.java   
public Reader newConnectionReader(Reader newReader) {
    ((ObservableReader)reader).removeReaderListener(readerListener);
    ObservableReader debugReader = new ObservableReader(newReader);
    debugReader.addReaderListener(readerListener);
    reader = debugReader;
    return reader;
}
项目:androidpn_enhanced_client    文件:ConsoleDebugger.java   
public Reader newConnectionReader(Reader newReader) {
    ((ObservableReader)reader).removeReaderListener(readerListener);
    ObservableReader debugReader = new ObservableReader(newReader);
    debugReader.addReaderListener(readerListener);
    reader = debugReader;
    return reader;
}
项目:jamppa    文件:ConsoleDebugger.java   
public Reader newConnectionReader(Reader newReader) {
    ((ObservableReader) reader).removeReaderListener(readerListener);
    ObservableReader debugReader = new ObservableReader(newReader);
    debugReader.addReaderListener(readerListener);
    reader = debugReader;
    return reader;
}
项目:jamppa    文件:LiteDebugger.java   
public Reader newConnectionReader(Reader newReader) {
    ((ObservableReader) reader).removeReaderListener(readerListener);
    ObservableReader debugReader = new ObservableReader(newReader);
    debugReader.addReaderListener(readerListener);
    reader = debugReader;
    return reader;
}
项目:Smack    文件:LiteDebugger.java   
/**
 * Notification that the root window is closing. Stop listening for received and 
 * transmitted packets.
 * 
 * @param evt the event that indicates that the root window is closing 
 */
public void rootWindowClosing(WindowEvent evt) {
    connection.removeAsyncStanzaListener(listener);
    ((ObservableReader)reader).removeReaderListener(readerListener);
    ((ObservableWriter)writer).removeWriterListener(writerListener);
}
项目:jamppa    文件:LiteDebugger.java   
/**
 * Notification that the root window is closing. Stop listening for received
 * and transmitted packets.
 * 
 * @param evt
 *            the event that indicates that the root window is closing
 */
public void rootWindowClosing(WindowEvent evt) {
    connection.removePacketListener(listener);
    ((ObservableReader) reader).removeReaderListener(readerListener);
    ((ObservableWriter) writer).removeWriterListener(writerListener);
}