protected void sendToStomp(StompFrame command) throws IOException { stompTransport.sendToStomp(command); }
protected void sendToStomp(StompFrame command) throws IOException { stompTransport.sendToStomp(command); }
protected void sendToStomp(StompFrame command) throws IOException { stompTransport.sendToStomp(command); }
protected void sendToStomp(StompFrame command) throws IOException { stompTransport.sendToStomp(command); }
@Override public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, command); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); } } };
@Override public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, command); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); } } };
@Override public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, command); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); } } };
public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, command); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); } } };
void onMessageDispatch(MessageDispatch md, String ackId) throws IOException, JMSException { ActiveMQMessage message = (ActiveMQMessage)md.getMessage(); if (ackMode.equals(CLIENT_ACK) || ackMode.equals(INDIVIDUAL_ACK)) { synchronized (this) { dispatchedMessage.put(message.getMessageId(), md); } } else if (ackMode.equals(AUTO_ACK)) { MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1); protocolConverter.getStompTransport().sendToActiveMQ(ack); } boolean ignoreTransformation = false; if (transformation != null && !( message instanceof ActiveMQBytesMessage ) ) { message.setReadOnlyProperties(false); message.setStringProperty(Stomp.Headers.TRANSFORMATION, transformation); } else { if (message.getStringProperty(Stomp.Headers.TRANSFORMATION) != null) { ignoreTransformation = true; } } StompFrame command = protocolConverter.convertMessage(message, ignoreTransformation); command.setAction(Stomp.Responses.MESSAGE); if (subscriptionId != null) { command.getHeaders().put(Stomp.Headers.Message.SUBSCRIPTION, subscriptionId); } if (ackId != null) { command.getHeaders().put(Stomp.Headers.Message.ACK_ID, ackId); } protocolConverter.getStompTransport().sendToStomp(command); }
void onMessageDispatch(MessageDispatch md, String ackId) throws IOException, JMSException { ActiveMQMessage message = (ActiveMQMessage)md.getMessage(); if (ackMode.equals(CLIENT_ACK) || ackMode.equals(INDIVIDUAL_ACK)) { synchronized (this) { dispatchedMessage.put(message.getMessageId(), md); } } else if (ackMode.equals(AUTO_ACK)) { MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1); protocolConverter.getStompTransport().sendToActiveMQ(ack); } boolean ignoreTransformation = false; if (transformation != null && !( message instanceof ActiveMQBytesMessage ) ) { message.setReadOnlyProperties(false); message.setStringProperty(Stomp.Headers.TRANSFORMATION, transformation); } else { if (message.getStringProperty(Stomp.Headers.TRANSFORMATION) != null) { ignoreTransformation = true; } } StompFrame command = protocolConverter.convertMessage(message, ignoreTransformation); command.setAction(Stomp.Responses.MESSAGE); if (subscriptionId != null) { command.getHeaders().put(Stomp.Headers.Message.SUBSCRIPTION, subscriptionId); } if (ackId != null) { command.getHeaders().put(Stomp.Headers.Message.ACK_ID, ackId); } protocolConverter.getStompTransport().sendToStomp(command); }
void onMessageDispatch(MessageDispatch md, String ackId) throws IOException, JMSException { ActiveMQMessage message = (ActiveMQMessage)md.getMessage(); if (ackMode.equals(CLIENT_ACK) || ackMode.equals(INDIVIDUAL_ACK)) { synchronized (this) { dispatchedMessage.put(message.getMessageId(), md); } } else if (ackMode.equals(AUTO_ACK)) { MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1); protocolConverter.getStompTransport().sendToActiveMQ(ack); } boolean ignoreTransformation = false; if (transformation != null && !( message instanceof ActiveMQBytesMessage ) ) { message.setReadOnlyProperties(false); message.setStringProperty(Stomp.Headers.TRANSFORMATION, transformation); } else { if (message.getStringProperty(Stomp.Headers.TRANSFORMATION) != null) { ignoreTransformation = true; } } StompFrame command = protocolConverter.convertMessage(message, ignoreTransformation); command.setAction(Stomp.Responses.MESSAGE); if (subscriptionId != null) { command.getHeaders().put(Stomp.Headers.Message.SUBSCRIPTION, subscriptionId); } if (ackId != null) { command.getHeaders().put(Stomp.Headers.Message.ACK_ID, ackId); } protocolConverter.getStompTransport().sendToStomp(command); }
@Override public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, cmd); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); ConsumerControl control = new ConsumerControl(); control.setPrefetch(prefetch); control.setDestination(actualDest); control.setConsumerId(id); sendToActiveMQ(control, null); } } };
void onMessageDispatch(MessageDispatch md) throws IOException, JMSException { ActiveMQMessage message = (ActiveMQMessage)md.getMessage(); if (ackMode == CLIENT_ACK) { synchronized (this) { dispatchedMessage.put(message.getMessageId(), md); } } else if (ackMode == INDIVIDUAL_ACK) { synchronized (this) { dispatchedMessage.put(message.getMessageId(), md); } } else if (ackMode == AUTO_ACK) { MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1); protocolConverter.getStompTransport().sendToActiveMQ(ack); } boolean ignoreTransformation = false; if (transformation != null && !( message instanceof ActiveMQBytesMessage ) ) { message.setReadOnlyProperties(false); message.setStringProperty(Stomp.Headers.TRANSFORMATION, transformation); } else { if (message.getStringProperty(Stomp.Headers.TRANSFORMATION) != null) { ignoreTransformation = true; } } StompFrame command = protocolConverter.convertMessage(message, ignoreTransformation); command.setAction(Stomp.Responses.MESSAGE); if (subscriptionId != null) { command.getHeaders().put(Stomp.Headers.Message.SUBSCRIPTION, subscriptionId); } protocolConverter.getStompTransport().sendToStomp(command); }
@Override public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, cmd); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); ConsumerControl control = new ConsumerControl(); control.setPrefetch(prefetch); control.setDestination(actualDest); control.setConsumerId(id); sendToActiveMQ(control, null); } } };
@Override public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, cmd); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); ConsumerControl control = new ConsumerControl(); control.setPrefetch(prefetch); control.setDestination(actualDest); control.setConsumerId(id); sendToActiveMQ(control, null); } } };
stompTransport.sendToStomp(ping); } else if (command.getDataStructureType() == ConnectionError.DATA_STRUCTURE_TYPE) {
stompTransport.sendToStomp(ping); } else if (command.getDataStructureType() == ConnectionError.DATA_STRUCTURE_TYPE) {
stompTransport.sendToStomp(ping); } else if (command.getDataStructureType() == ConnectionError.DATA_STRUCTURE_TYPE) {