protected void checkWrite() throws JMSException { if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } }
public void setInputStream(final InputStream input) throws JMSException { checkStream(); if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } message.setBodyInputStream(input); }
private void checkProperty(final String name) throws JMSException { if (propertiesReadOnly) { if (name.equals(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM)) { throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM + " or " + ActiveMQJMSConstants.JMS_ACTIVEMQ_SAVE_STREAM + "?"); } else { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } } if (name == null) { throw ActiveMQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("property"); } if (name.equals("")) { throw new IllegalArgumentException("The name of a property must not be an empty String."); } if (!isValidJavaIdentifier(name)) { throw ActiveMQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name); } if (ActiveMQMessage.reservedIdentifiers.contains(name)) { throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax."); } if (name.startsWith("JMS_ACTIVEMQ")) { throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_ACTIVEMQ"); } }
protected void checkWrite() throws JMSException { if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } }
protected void checkWrite() throws JMSException { if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } }
protected void checkWrite() throws JMSException { if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } }
protected void checkWrite() throws JMSException { if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } }
public void setInputStream(final InputStream input) throws JMSException { checkStream(); if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } message.setBodyInputStream(input); }
public void setInputStream(final InputStream input) throws JMSException { checkStream(); if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } message.setBodyInputStream(input); }
public void setInputStream(final InputStream input) throws JMSException { checkStream(); if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } message.setBodyInputStream(input); }
public void setInputStream(final InputStream input) throws JMSException { checkStream(); if (readOnly) { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } message.setBodyInputStream(input); }
private void checkProperty(final String name) throws JMSException { if (propertiesReadOnly) { if (name != null && name.equals(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM)) { throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM + " or " + ActiveMQJMSConstants.JMS_ACTIVEMQ_SAVE_STREAM + "?"); } else { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } } if (name == null) { throw ActiveMQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("property"); } if (name.equals("")) { throw new IllegalArgumentException("The name of a property must not be an empty String."); } if (!isValidJavaIdentifier(name)) { throw ActiveMQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name); } if (ActiveMQMessage.reservedIdentifiers.contains(name)) { throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax."); } if (name.startsWith("JMS_ACTIVEMQ")) { throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_ACTIVEMQ"); } }
private void checkProperty(final String name) throws JMSException { if (propertiesReadOnly) { if (name != null && name.equals(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM)) { throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM + " or " + ActiveMQJMSConstants.JMS_ACTIVEMQ_SAVE_STREAM + "?"); } else { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } } if (name == null) { throw ActiveMQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("property"); } if (name.equals("")) { throw new IllegalArgumentException("The name of a property must not be an empty String."); } if (!isValidJavaIdentifier(name)) { throw ActiveMQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name); } if (ActiveMQMessage.reservedIdentifiers.contains(name)) { throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax."); } if (name.startsWith("JMS_ACTIVEMQ")) { throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_ACTIVEMQ"); } }
private void checkProperty(final String name) throws JMSException { if (propertiesReadOnly) { if (name.equals(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM)) { throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM + " or " + ActiveMQJMSConstants.JMS_ACTIVEMQ_SAVE_STREAM + "?"); } else { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } } if (name == null) { throw ActiveMQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("property"); } if (name.equals("")) { throw new IllegalArgumentException("The name of a property must not be an empty String."); } if (!isValidJavaIdentifier(name)) { throw ActiveMQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name); } if (ActiveMQMessage.reservedIdentifiers.contains(name)) { throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax."); } if (name.startsWith("JMS_ACTIVEMQ")) { throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_ACTIVEMQ"); } }
private void checkProperty(final String name) throws JMSException { if (propertiesReadOnly) { if (name.equals(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM)) { throw new MessageNotWriteableException("You cannot set the Input Stream on received messages. Did you mean " + ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM + " or " + ActiveMQJMSConstants.JMS_ACTIVEMQ_SAVE_STREAM + "?"); } else { throw ActiveMQJMSClientBundle.BUNDLE.messageNotWritable(); } } if (name == null) { throw ActiveMQJMSClientBundle.BUNDLE.nullArgumentNotAllowed("property"); } if (name.equals("")) { throw new IllegalArgumentException("The name of a property must not be an empty String."); } if (!isValidJavaIdentifier(name)) { throw ActiveMQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name); } if (ActiveMQMessage.reservedIdentifiers.contains(name)) { throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax."); } if (name.startsWith("JMS_ACTIVEMQ")) { throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_ACTIVEMQ"); } }