275276277278279280281282283284
Object value = map.get(name); if (value == null) { return null; } if (value instanceof byte[]) { throw new OpenwireException("Use getBytes to read a byte array"); } else { return value.toString(); } }
287288289290291292293294
initializeReading(); Object value = map.get(name); if (value instanceof byte[]) { return (byte[])value; } else { throw new OpenwireException(" cannot read a byte[] from " + value.getClass().getName()); } }
129130131132133134135136137138
public URL getURL() throws OpenwireException { if (url == null && remoteBlobUrl != null) { try { url = new URL(remoteBlobUrl); } catch (MalformedURLException e) { throw new OpenwireException(e); } } return url; }
158159160161162163164165166
if (blobUploader != null) { try { URL value = blobUploader.upload(this); setURL(value); } catch (IOException e) { throw new OpenwireException(e); } } }
818283848586878889
try { acknowledgeCallback.execute(); } catch (OpenwireException e) { throw e; } catch (Throwable e) { throw new OpenwireException(e); } } }
138139140141142143144145
MessageId id = null; try { id = new MessageId(producerId, producerSequenceId); this.setMessageId(id); } catch (Throwable e) { throw new OpenwireException("Invalid message id '" + id + "', reason: " + e.getMessage(), e); } }
177178179180181182183184
if (data == null) { return null; } return new String(data, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new OpenwireException("Invalid UTF-8 encoding: " + e.getMessage()); } }
188189190191192193194195
if (data == null) { return null; } return data.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new OpenwireException("Invalid UTF-8 encoding: " + e.getMessage()); } }
257258259260261262263264
public boolean propertyExists(String name) throws OpenwireException { try { return this.getProperties().containsKey(name); } catch (IOException e) { throw new OpenwireException(e); } }
265266267268269270271272
public Enumeration getPropertyNames() throws OpenwireException { try { return new Vector<String>(this.getProperties().keySet()).elements(); } catch (IOException e) { throw new OpenwireException(e); } }