229230231232233234235236
return ((Byte)value).longValue(); } if (value instanceof String) { return Long.valueOf(value.toString()).longValue(); } else { throw new OpenwireException(" cannot read a long from " + value.getClass().getName()); } }
245246247248249250251252
return ((Float)value).floatValue(); } if (value instanceof String) { return Float.valueOf(value.toString()).floatValue(); } else { throw new OpenwireException(" cannot read a float from " + value.getClass().getName()); } }
264265266267268269270271
return ((Float)value).floatValue(); } if (value instanceof String) { return Float.valueOf(value.toString()).floatValue(); } else { throw new OpenwireException(" cannot read a double from " + value.getClass().getName()); } }
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()); } }