/** * Resets the parser using the latest connection's reader. Reseting the * parser is necessary when the plain connection has been secured or when a * new opening stream element is going to be sent by the server. */ private void resetParser() { try { innerReader = new XPPPacketReader(); innerReader.setXPPFactory(XmlPullParserFactory.newInstance()); innerReader.getXPPParser().setInput(connection.reader); reset = true; } catch (Exception xppe) { LOGGER.log(Level.WARN, "Error while resetting parser", xppe); } }
/** * Create dedicated read thread for this socket. * * @param component The component for which this thread is reading for * @param reader The reader to use for reading */ public SocketReadThread(ExternalComponent component, XPPPacketReader reader) { super("Component socket reader"); this.component = component; this.reader = reader; }
/** * Create dedicated read thread for this socket. * * @param component * The component for which this thread is reading for * @param reader * The reader to use for reading */ public SocketReadThread(ExternalComponent component, XPPPacketReader reader) { super("Component socket reader"); this.component = component; this.reader = reader; }