CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 CloseListener.java 源代码,内容仅作参考
package org.jivesoftware.smackx.bytestreams.ibb;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.iqrequest.AbstractIqRequestHandler;
import org.jivesoftware.smack.iqrequest.IQRequestHandler;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smackx.bytestreams.ibb.packet.Close;
public class CloseListener extends AbstractIqRequestHandler {
private final InBandBytestreamManager manager;
public CloseListener(InBandBytestreamManager inBandBytestreamManager) {
super(Close.ELEMENT, "http://jabber.org/protocol/ibb", IQ.Type.set, IQRequestHandler.Mode.async);
this.manager = inBandBytestreamManager;
}
@Override
public IQ handleIQRequest(IQ iq) {
Close close = (Close) iq;
InBandBytestreamSession inBandBytestreamSession = this.manager.getSessions().get(close.getSessionID());
if (inBandBytestreamSession == null) {
try {
this.manager.replyItemNotFoundPacket(close);
} catch (InterruptedException | SmackException.NotConnectedException unused) {
return null;
}
} else {
try {
inBandBytestreamSession.closeByPeer(close);
this.manager.getSessions().remove(close.getSessionID());
} catch (InterruptedException | SmackException.NotConnectedException unused2) {
}
}
return null;
}
}