Java 类org.jivesoftware.smack.parsing.ParsingExceptionCallback 实例源码

项目:Smack    文件:AbstractXMPPConnection.java   
protected void parseAndProcessStanza(XmlPullParser parser) throws Exception {
    ParserUtils.assertAtStartTag(parser);
    int parserDepth = parser.getDepth();
    Stanza stanza = null;
    try {
        stanza = PacketParserUtils.parseStanza(parser);
    }
    catch (Exception e) {
        CharSequence content = PacketParserUtils.parseContentDepth(parser,
                        parserDepth);
        UnparsablePacket message = new UnparsablePacket(content, e);
        ParsingExceptionCallback callback = getParsingExceptionCallback();
        if (callback != null) {
            callback.handleUnparsablePacket(message);
        }
    }
    ParserUtils.assertAtEndTag(parser);
    if (stanza != null) {
        processPacket(stanza);
    }
}
项目:Smack    文件:AbstractXMPPConnection.java   
/**
 * Install a parsing exception callback, which will be invoked once an exception is encountered while parsing a
 * stanza
 * 
 * @param callback the callback to install
 */
public void setParsingExceptionCallback(ParsingExceptionCallback callback) {
    parsingExceptionCallback = callback;
}
项目:Smack    文件:AbstractXMPPConnection.java   
/**
 * Get the current active parsing exception callback.
 *  
 * @return the active exception callback or null if there is none
 */
public ParsingExceptionCallback getParsingExceptionCallback() {
    return parsingExceptionCallback;
}
项目:Smack    文件:SmackConfiguration.java   
/**
 * Set the default parsing exception callback for all newly created connections
 *
 * @param callback
 * @see ParsingExceptionCallback
 */
public static void setDefaultParsingExceptionCallback(ParsingExceptionCallback callback) {
    defaultCallback = callback;
}
项目:Smack    文件:SmackConfiguration.java   
/**
 * Returns the default parsing exception callback
 * 
 * @return the default parsing exception callback
 * @see ParsingExceptionCallback
 */
public static ParsingExceptionCallback getDefaultParsingExceptionCallback() {
    return defaultCallback;
}
项目:androidPN-client.    文件:XMPPConnection.java   
/**
 * Install a parsing exception callback, which will be invoked once an exception is encountered while parsing a
 * stanza
 * 
 * @param callback the callback to install
 */
public void setParsingExceptionCallback(ParsingExceptionCallback callback) {
    parsingExceptionCallback = callback;
}
项目:androidPN-client.    文件:XMPPConnection.java   
/**
 * Get the current active parsing exception callback.
 *  
 * @return the active exception callback or null if there is none
 */
public ParsingExceptionCallback getParsingExceptionCallback() {
    return parsingExceptionCallback;
}
项目:androidPN-client.    文件:SmackConfiguration.java   
/**
 * Set the default parsing exception callback for all newly created connections
 *
 * @param callback
 * @see ParsingExceptionCallback
 */
public static void setDefaultParsingExceptionCallback(ParsingExceptionCallback callback) {
    defaultCallback = callback;
}
项目:androidPN-client.    文件:SmackConfiguration.java   
/**
 * Returns the default parsing exception callback
 * 
 * @return the default parsing exception callback
 * @see ParsingExceptionCallback
 */
public static ParsingExceptionCallback getDefaultParsingExceptionCallback() {
    return defaultCallback;
}
项目:jamppa    文件:XMPPConnection.java   
/**
 * Install a parsing exception callback, which will be invoked once an
 * exception is encountered while parsing a stanza
 * 
 * @param callback
 *            the callback to install
 */
public void setParsingExceptionCallback(ParsingExceptionCallback callback) {
    parsingExceptionCallback = callback;
}
项目:jamppa    文件:XMPPConnection.java   
/**
 * Get the current active parsing exception callback.
 * 
 * @return the active exception callback or null if there is none
 */
public ParsingExceptionCallback getParsingExceptionCallback() {
    return parsingExceptionCallback;
}
项目:jamppa    文件:SmackConfiguration.java   
/**
 * Set the default parsing exception callback for all newly created
 * connections
 * 
 * @param callback
 * @see ParsingExceptionCallback
 */
public static void setDefaultParsingExceptionCallback(
        ParsingExceptionCallback callback) {
    initialize();
    defaultCallback = callback;
}
项目:jamppa    文件:SmackConfiguration.java   
/**
 * Returns the default parsing exception callback
 * 
 * @return the default parsing exception callback
 * @see ParsingExceptionCallback
 */
public static ParsingExceptionCallback getDefaultParsingExceptionCallback() {
    initialize();
    return defaultCallback;
}
项目:asmack-mini    文件:XMPPConnection.java   
/**
 * Install a parsing exception callback, which will be invoked once an exception is encountered while parsing a
 * stanza
 * 
 * @param callback the callback to install
 */
public void setParsingExceptionCallback(ParsingExceptionCallback callback) {
    parsingExceptionCallback = callback;
}
项目:asmack-mini    文件:XMPPConnection.java   
/**
 * Get the current active parsing exception callback.
 *  
 * @return the active exception callback or null if there is none
 */
public ParsingExceptionCallback getParsingExceptionCallback() {
    return parsingExceptionCallback;
}
项目:asmack-mini    文件:SmackConfiguration.java   
/**
 * Set the default parsing exception callback for all newly created connections
 *
 * @param callback
 * @see ParsingExceptionCallback
 */
public static void setDefaultParsingExceptionCallback(ParsingExceptionCallback callback) {
    defaultCallback = callback;
}
项目:asmack-mini    文件:SmackConfiguration.java   
/**
 * Returns the default parsing exception callback
 * 
 * @return the default parsing exception callback
 * @see ParsingExceptionCallback
 */
public static ParsingExceptionCallback getDefaultParsingExceptionCallback() {
    return defaultCallback;
}