@Override public IQ handleIQRequest(IQ iqRequest) { Close closeRequest = (Close) iqRequest; InBandBytestreamSession ibbSession = this.manager.getSessions().get( closeRequest.getSessionID()); if (ibbSession == null) { try { this.manager.replyItemNotFoundPacket(closeRequest); } catch (InterruptedException | NotConnectedException e) { return null; } } else { try { ibbSession.closeByPeer(closeRequest); } catch (InterruptedException | NotConnectedException e) { return null; } this.manager.getSessions().remove(closeRequest.getSessionID()); } return null; }
@Override public IQ handleIQRequest(IQ iqRequest) { Data data = (Data) iqRequest; InBandBytestreamSession ibbSession = this.manager.getSessions().get( data.getDataPacketExtension().getSessionID()); try { if (ibbSession == null) { this.manager.replyItemNotFoundPacket(data); } else { ibbSession.processIQPacket(data); } } catch (NotConnectedException | InterruptedException | NotLoggedInException e) { return null; } return null; }
/** * Accepts the In-Band Bytestream open request and returns the session to * send/receive data. * * @return the session to send/receive data * @throws NotConnectedException * @throws InterruptedException */ @Override public InBandBytestreamSession accept() throws NotConnectedException, InterruptedException { XMPPConnection connection = this.manager.getConnection(); // create In-Band Bytestream session and store it InBandBytestreamSession ibbSession = new InBandBytestreamSession(connection, this.byteStreamRequest, this.byteStreamRequest.getFrom()); this.manager.getSessions().put(this.byteStreamRequest.getSessionID(), ibbSession); // acknowledge request IQ resultIQ = IQ.createResultIQ(this.byteStreamRequest); connection.sendStanza(resultIQ); return ibbSession; }
InBandBytestreamManager.getByteStreamManager(this.connection).getSessions().remove(byteStreamRequest.getSessionID());
public void processPacket(Packet packet) { Close closeRequest = (Close) packet; InBandBytestreamSession ibbSession = this.manager.getSessions().get( closeRequest.getSessionID()); if (ibbSession == null) { this.manager.replyItemNotFoundPacket(closeRequest); } else { ibbSession.closeByPeer(closeRequest); this.manager.getSessions().remove(closeRequest.getSessionID()); } }
public void processPacket(Packet packet) { Close closeRequest = (Close) packet; InBandBytestreamSession ibbSession = this.manager.getSessions().get( closeRequest.getSessionID()); if (ibbSession == null) { this.manager.replyItemNotFoundPacket(closeRequest); } else { ibbSession.closeByPeer(closeRequest); this.manager.getSessions().remove(closeRequest.getSessionID()); } }
public void processPacket(Packet packet) { Close closeRequest = (Close) packet; InBandBytestreamSession ibbSession = this.manager.getSessions().get( closeRequest.getSessionID()); if (ibbSession == null) { this.manager.replyItemNotFoundPacket(closeRequest); } else { ibbSession.closeByPeer(closeRequest); this.manager.getSessions().remove(closeRequest.getSessionID()); } }
public void processPacket(Packet packet) { Data data = (Data) packet; InBandBytestreamSession ibbSession = this.manager.getSessions().get( data.getDataPacketExtension().getSessionID()); if (ibbSession == null) { this.manager.replyItemNotFoundPacket(data); } }
public void processPacket(Packet packet) { Data data = (Data) packet; InBandBytestreamSession ibbSession = this.manager.getSessions().get( data.getDataPacketExtension().getSessionID()); if (ibbSession == null) { this.manager.replyItemNotFoundPacket(data); } }
public void processPacket(Packet packet) { Data data = (Data) packet; InBandBytestreamSession ibbSession = this.manager.getSessions().get( data.getDataPacketExtension().getSessionID()); if (ibbSession == null) { this.manager.replyItemNotFoundPacket(data); } }
/** * Accepts the In-Band Bytestream open request and returns the session to * send/receive data. * * @return the session to send/receive data * @throws XMPPException if stream is invalid. */ public InBandBytestreamSession accept() throws XMPPException { Connection connection = this.manager.getConnection(); // create In-Band Bytestream session and store it InBandBytestreamSession ibbSession = new InBandBytestreamSession(connection, this.byteStreamRequest, this.byteStreamRequest.getFrom()); this.manager.getSessions().put(this.byteStreamRequest.getSessionID(), ibbSession); // acknowledge request IQ resultIQ = IQ.createResultIQ(this.byteStreamRequest); connection.sendPacket(resultIQ); return ibbSession; }
/** * Accepts the In-Band Bytestream open request and returns the session to * send/receive data. * * @return the session to send/receive data * @throws XMPPException if stream is invalid. */ public InBandBytestreamSession accept() throws XMPPException { Connection connection = this.manager.getConnection(); // create In-Band Bytestream session and store it InBandBytestreamSession ibbSession = new InBandBytestreamSession(connection, this.byteStreamRequest, this.byteStreamRequest.getFrom()); this.manager.getSessions().put(this.byteStreamRequest.getSessionID(), ibbSession); // acknowledge request IQ resultIQ = IQ.createResultIQ(this.byteStreamRequest); connection.sendPacket(resultIQ); return ibbSession; }
/** * Accepts the In-Band Bytestream open request and returns the session to * send/receive data. * * @return the session to send/receive data * @throws XMPPException if stream is invalid. */ public InBandBytestreamSession accept() throws XMPPException { Connection connection = this.manager.getConnection(); // create In-Band Bytestream session and store it InBandBytestreamSession ibbSession = new InBandBytestreamSession(connection, this.byteStreamRequest, this.byteStreamRequest.getFrom()); this.manager.getSessions().put(this.byteStreamRequest.getSessionID(), ibbSession); // acknowledge request IQ resultIQ = IQ.createResultIQ(this.byteStreamRequest); connection.sendPacket(resultIQ); return ibbSession; }
InBandBytestreamManager.getByteStreamManager(this.connection).getSessions().remove(this);
InBandBytestreamManager.getByteStreamManager(this.connection).getSessions().remove(this);
InBandBytestreamManager.getByteStreamManager(this.connection).getSessions().remove(this);