public URL getURL() throws JMSException { if (url == null && remoteBlobUrl != null) { try { url = new URL(remoteBlobUrl); } catch (MalformedURLException e) { throw JMSExceptionSupport.create(e); } } return url; }
/** * Reads a <code>float</code> from the bytes message stream. * * @return the next four bytes from the bytes message stream, interpreted as * a <code>float</code> * @throws JMSException if the JMS provider fails to read the message due to * some internal error. * @throws MessageEOFException if unexpected end of bytes stream has been * reached. * @throws MessageNotReadableException if the message is in write-only mode. */ @Override public float readFloat() throws JMSException { initializeReading(); try { return this.dataIn.readFloat(); } catch (EOFException e) { throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e); } }
this.dataIn.reset(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e);
this.dataIn.reset(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e);
private void waitForBrokerInfo() throws JMSException { try { brokerInfoReceived.await(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw JMSExceptionSupport.create(e); } }
this.dataIn.reset(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e);
/** * Reads a <code>boolean</code> from the bytes message stream. * * @return the <code>boolean</code> value read * @throws JMSException if the JMS provider fails to read the message due to * some internal error. * @throws MessageEOFException if unexpected end of bytes stream has been * reached. * @throws MessageNotReadableException if the message is in write-only mode. */ @Override public boolean readBoolean() throws JMSException { initializeReading(); try { return this.dataIn.readBoolean(); } catch (EOFException e) { throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e); } }
private void doAsyncSendPacket(Command command) throws JMSException { try { this.transport.oneway(command); } catch (IOException e) { throw JMSExceptionSupport.create(e); } }
this.dataIn.reset(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e);
/** * Reads a signed 8-bit value from the bytes message stream. * * @return the next byte from the bytes message stream as a signed 8-bit * <code>byte</code> * @throws JMSException if the JMS provider fails to read the message due to * some internal error. * @throws MessageEOFException if unexpected end of bytes stream has been * reached. * @throws MessageNotReadableException if the message is in write-only mode. */ @Override public byte readByte() throws JMSException { initializeReading(); try { return this.dataIn.readByte(); } catch (EOFException e) { throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e); } }
@Override public void acknowledge() throws JMSException { if (acknowledgeCallback != null) { try { acknowledgeCallback.execute(); } catch (JMSException e) { throw e; } catch (Throwable e) { throw JMSExceptionSupport.create(e); } } }
this.dataIn.reset(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e);
/** * Reads an unsigned 8-bit number from the bytes message stream. * * @return the next byte from the bytes message stream, interpreted as an * unsigned 8-bit number * @throws JMSException if the JMS provider fails to read the message due to * some internal error. * @throws MessageEOFException if unexpected end of bytes stream has been * reached. * @throws MessageNotReadableException if the message is in write-only mode. */ @Override public int readUnsignedByte() throws JMSException { initializeReading(); try { return this.dataIn.readUnsignedByte(); } catch (EOFException e) { throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e); } }
/** * Used for handling async exceptions * * @param error */ public void onAsyncException(Throwable error) { if (!closed.get() && !closing.get()) { if (this.exceptionListener != null) { if (!(error instanceof JMSException)) { error = JMSExceptionSupport.create(error); } final JMSException e = (JMSException)error; executor.execute(new Runnable() { @Override public void run() { ActiveMQConnection.this.exceptionListener.onException(e); } }); } else { LOG.debug("Async exception with no exception listener: " + error, error); } } }
this.dataIn.reset(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e);
/** * Reads an unsigned 16-bit number from the bytes message stream. * * @return the next two bytes from the bytes message stream, interpreted as * an unsigned 16-bit integer * @throws JMSException if the JMS provider fails to read the message due to * some internal error. * @throws MessageEOFException if unexpected end of bytes stream has been * reached. * @throws MessageNotReadableException if the message is in write-only mode. */ @Override public int readUnsignedShort() throws JMSException { initializeReading(); try { return this.dataIn.readUnsignedShort(); } catch (EOFException e) { throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e); } }
/** * return all property names, including standard JMS properties and JMSX properties * @return Enumeration of all property names on this message * @throws JMSException */ @SuppressWarnings("rawtypes") public Enumeration getAllPropertyNames() throws JMSException { try { Vector<String> result = new Vector<String>(this.getProperties().keySet()); result.addAll(JMS_PROPERTY_SETERS.keySet()); return result.elements(); } catch (IOException e) { throw JMSExceptionSupport.create(e); } }
this.dataIn.reset(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e);
/** * Reads a Unicode character value from the bytes message stream. * * @return the next two bytes from the bytes message stream as a Unicode * character * @throws JMSException if the JMS provider fails to read the message due to * some internal error. * @throws MessageEOFException if unexpected end of bytes stream has been * reached. * @throws MessageNotReadableException if the message is in write-only mode. */ @Override public char readChar() throws JMSException { initializeReading(); try { return this.dataIn.readChar(); } catch (EOFException e) { throw JMSExceptionSupport.createMessageEOFException(e); } catch (IOException e) { throw JMSExceptionSupport.createMessageFormatException(e); } }
private void beforeEnd() throws JMSException { if (synchronizations == null) { return; } int size = synchronizations.size(); try { for (;beforeEndIndex < size;) { synchronizations.get(beforeEndIndex++).beforeEnd(); } } catch (JMSException e) { throw e; } catch (Throwable e) { throw JMSExceptionSupport.create(e); } }