Examples of OpenwireException


Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.OpenwireException

        try {
            Class clazz = Class.forName(className.toString(), false, BaseDataStreamMarshaller.class.getClassLoader());
            Constructor constructor = clazz.getConstructor(new Class[] {UTF8Buffer.class});
            return (Throwable)constructor.newInstance(new Object[] {message.toString()});
        } catch (Throwable e) {
            return new OpenwireException(message.toString(), className.toString());
        }
    }
View Full Code Here

Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.support.OpenwireException

                    dataIn.close();
                    setContent(null);
                    setCompressed(false);
                }
            } catch (IOException ioe) {
                throw new OpenwireException(ioe);
            } finally {
                if (is != null) {
                    try {
                        is.close();
                    } catch (IOException e) {
View Full Code Here

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

        try {
            Class clazz = Class.forName(className.toString(), false, BaseDataStreamMarshaller.class.getClassLoader());
            Constructor constructor = clazz.getConstructor(new Class[] {UTF8Buffer.class});
            return (Throwable)constructor.newInstance(new Object[] {message.toString()});
        } catch (Throwable e) {
            return new OpenwireException(message.toString(), className.toString());
        }
    }
View Full Code Here

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

                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

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

                DataInputStream dataIn = new DataInputStream(is);
                map = MarshallingSupport.unmarshalPrimitiveMap(dataIn);
                dataIn.close();
            }
        } catch (IOException e) {
            throw new OpenwireException(e);
        }
    }
View Full Code Here

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

            return ((Boolean)value).booleanValue();
        }
        if (value instanceof String) {
            return Boolean.valueOf(value.toString()).booleanValue();
        } else {
            throw new OpenwireException(" cannot read a boolean from " + value.getClass().getName());
        }
    }
View Full Code Here

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

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

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

            return ((Byte)value).shortValue();
        }
        if (value instanceof String) {
            return Short.valueOf(value.toString()).shortValue();
        } else {
            throw new OpenwireException(" cannot read a short from " + value.getClass().getName());
        }
    }
View Full Code Here

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

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

            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
TOP
Copyright © 2018 www.massapi.com. 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.