/** * Responds an error with an specific condition. * * @param response the response to send. * @param condition the condition of the error. */ private void respondError(AdHocCommandData response, XMPPError.Condition condition) { respondError(response, new XMPPError(condition)); }
/** * Responds an error with an specific condition. * * @param response the response to send. * @param condition the condition of the error. */ private void respondError(AdHocCommandData response, XMPPError.Condition condition) { respondError(response, new XMPPError(condition)); }
/** * Responds an error with an specific condition. * * @param response the response to send. * @param condition the condition of the error. */ private void respondError(AdHocCommandData response, XMPPError.Condition condition) { respondError(response, new XMPPError(condition)); }
/** * Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream open * request is rejected because its block size is greater than the maximum allowed block size. * * @param request IQ packet that should be answered with a resource-constraint error */ protected void replyResourceConstraintPacket(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.resource_constraint); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); }
/** * Responses to the given packet's sender with a XMPP error that a SOCKS5 Bytestream is not * accepted. * * @param packet Packet that should be answered with a not-acceptable error */ protected void replyRejectPacket(IQ packet) { XMPPError xmppError = new XMPPError(XMPPError.Condition.no_acceptable); IQ errorIQ = IQ.createErrorResponse(packet, xmppError); this.connection.sendPacket(errorIQ); }
/** * Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream open * request is rejected because its block size is greater than the maximum allowed block size. * * @param request IQ packet that should be answered with a resource-constraint error */ protected void replyResourceConstraintPacket(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.resource_constraint); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); }
/** * Responses to the given packet's sender with a XMPP error that a SOCKS5 Bytestream is not * accepted. * * @param packet Packet that should be answered with a not-acceptable error */ protected void replyRejectPacket(IQ packet) { XMPPError xmppError = new XMPPError(XMPPError.Condition.no_acceptable); IQ errorIQ = IQ.createErrorResponse(packet, xmppError); this.connection.sendPacket(errorIQ); }
/** * Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream * session could not be found. * * @param request IQ packet that should be answered with a item-not-found error */ protected void replyItemNotFoundPacket(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.item_not_found); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); }
/** * Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream is * not accepted. * * @param request IQ packet that should be answered with a not-acceptable error */ protected void replyRejectPacket(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.no_acceptable); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); }
/** * Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream * session could not be found. * * @param request IQ packet that should be answered with a item-not-found error */ protected void replyItemNotFoundPacket(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.item_not_found); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); }
/** * Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream open * request is rejected because its block size is greater than the maximum allowed block size. * * @param request IQ packet that should be answered with a resource-constraint error */ protected void replyResourceConstraintPacket(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.resource_constraint); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); }
/** * Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream is * not accepted. * * @param request IQ packet that should be answered with a not-acceptable error */ protected void replyRejectPacket(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.no_acceptable); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); }
/** * Reject a stream initiation request from a remote user. * * @param si The Stream Initiation request to reject. */ public void rejectStream(final StreamInitiation si) { XMPPError error = new XMPPError(XMPPError.Condition.forbidden, "Offer Declined"); IQ iqPacket = createIQ(si.getPacketID(), si.getFrom(), si.getTo(), IQ.Type.ERROR); iqPacket.setError(error); connection.sendPacket(iqPacket); }
private void sendCancelMessage(Message message) { IQ error = FileTransferNegotiator.createIQ(message.getPacketID(), message.getFrom(), message.getTo(), IQ.Type.ERROR); error.setError(new XMPPError(504)); connection.sendPacket(error); }
/** * Reject a stream initiation request from a remote user. * * @param si The Stream Initiation request to reject. */ public void rejectStream(final StreamInitiation si) { XMPPError error = new XMPPError(XMPPError.Condition.forbidden, "Offer Declined"); IQ iqPacket = createIQ(si.getPacketID(), si.getFrom(), si.getTo(), IQ.Type.ERROR); iqPacket.setError(error); connection.sendPacket(iqPacket); }
/** * Reject a stream initiation request from a remote user. * * @param si The Stream Initiation request to reject. */ public void rejectStream(final StreamInitiation si) { XMPPError error = new XMPPError(XMPPError.Condition.forbidden, "Offer Declined"); IQ iqPacket = createIQ(si.getPacketID(), si.getFrom(), si.getTo(), IQ.Type.ERROR); iqPacket.setError(error); connection.sendPacket(iqPacket); }
/** * Reject a stream initiation request from a remote user. * * @param si The Stream Initiation request to reject. */ public void rejectStream(final StreamInitiation si) { XMPPError error = new XMPPError(403, "Offer Declined"); IQ iqPacket = createIQ(si.getPacketID(), si.getFrom(), si.getTo(), IQ.Type.ERROR); iqPacket.setError(error); connection.sendPacket(iqPacket); }
protected void rejectIncomingFileTransfer(FileTransferRequest request) { StreamInitiation initiation = request.getStreamInitiation(); IQ rejection = FileTransferNegotiator.createIQ( initiation.getPacketID(), initiation.getFrom(), initiation .getTo(), IQ.Type.ERROR); rejection.setError(new XMPPError(XMPPError.Condition.forbidden)); connection.sendPacket(rejection); } }
protected void rejectIncomingFileTransfer(FileTransferRequest request) { StreamInitiation initiation = request.getStreamInitiation(); IQ rejection = FileTransferNegotiator.createIQ( initiation.getPacketID(), initiation.getFrom(), initiation .getTo(), IQ.Type.ERROR); rejection.setError(new XMPPError(403)); connection.sendPacket(rejection); } }
protected void rejectIncomingFileTransfer(FileTransferRequest request) { StreamInitiation initiation = request.getStreamInitiation(); IQ rejection = FileTransferNegotiator.createIQ( initiation.getPacketID(), initiation.getFrom(), initiation .getTo(), IQ.Type.ERROR); rejection.setError(new XMPPError(XMPPError.Condition.no_acceptable)); connection.sendPacket(rejection); } }