Package org.apache.activemq.apollo.openwire.support

Examples of org.apache.activemq.apollo.openwire.support.OpenwireException


            throw new NullPointerException();
        }
        if (value instanceof Character) {
            return ((Character)value).charValue();
        } else {
            throw new OpenwireException(" cannot read a short from " + value.getClass().getName());
        }
    }
View Full Code Here


            return ((Byte)value).intValue();
        }
        if (value instanceof String) {
            return Integer.valueOf(value.toString()).intValue();
        } else {
            throw new OpenwireException(" cannot read an int from " + value.getClass().getName());
        }
    }
View Full Code Here

            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());
        }
    }
View Full Code Here

            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());
        }
    }
View Full Code Here

            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());
        }
    }
View Full Code Here

        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();
        }
    }
View Full Code Here

        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());
        }
    }
View Full Code Here

    public URL getURL() throws OpenwireException {
        if (url == null && remoteBlobUrl != null) {
            try {
                url = new URL(remoteBlobUrl.toString());
            } catch (MalformedURLException e) {
                throw new OpenwireException(e);
            }
        }
        return url;
    }
View Full Code Here

        if (blobUploader != null) {
            try {
                URL value = blobUploader.upload(this);
                setURL(value);
            } catch (IOException e) {
                throw new OpenwireException(e);
            }
        }
    }
View Full Code Here

                DataInputStream dataIn = new DataInputStream(is);
                ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn);
                try {
                    object = (Serializable)objIn.readObject();
                } catch (ClassNotFoundException ce) {
                    throw new OpenwireException("Failed to build body from content. Serializable class not available to broker. Reason: " + ce, ce);
                } finally {
                    dataIn.close();
                }
            } catch (IOException e) {
                throw new OpenwireException("Failed to build body from bytes. Reason: " + e, e);
            }
        }
        return this.object;
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.apollo.openwire.support.OpenwireException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.