Examples of OpenwireException


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

        if (value == null) {
            throw new NumberFormatException("property " + name + " was null");
        }
        Byte rc = (Byte) TypeConversionSupport.convert(value, Byte.class);
        if (rc == null) {
            throw new OpenwireException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a byte");
        }
        return rc.byteValue();
    }
View Full Code Here

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

        if (value == null) {
            throw new NumberFormatException("property " + name + " was null");
        }
        Short rc = (Short) TypeConversionSupport.convert(value, Short.class);
        if (rc == null) {
            throw new OpenwireException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a short");
        }
        return rc.shortValue();
    }
View Full Code Here

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

        if (value == null) {
            throw new NumberFormatException("property " + name + " was null");
        }
        Integer rc = (Integer) TypeConversionSupport.convert(value, Integer.class);
        if (rc == null) {
            throw new OpenwireException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as an integer");
        }
        return rc.intValue();
    }
View Full Code Here

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

        if (value == null) {
            throw new NumberFormatException("property " + name + " was null");
        }
        Long rc = (Long) TypeConversionSupport.convert(value, Long.class);
        if (rc == null) {
            throw new OpenwireException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a long");
        }
        return rc.longValue();
    }
View Full Code Here

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

        if (value == null) {
            throw new NullPointerException("property " + name + " was null");
        }
        Float rc = (Float) TypeConversionSupport.convert(value, Float.class);
        if (rc == null) {
            throw new OpenwireException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a float");
        }
        return rc.floatValue();
    }
View Full Code Here

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

        if (value == null) {
            throw new NullPointerException("property " + name + " was null");
        }
        Double rc = (Double) TypeConversionSupport.convert(value, Double.class);
        if (rc == null) {
            throw new OpenwireException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a double");
        }
        return rc.doubleValue();
    }
View Full Code Here

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

        if (value == null) {
            return null;
        }
        String rc = (String) TypeConversionSupport.convert(value, String.class);
        if (rc == null) {
            throw new OpenwireException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a String");
        }
        return rc;
    }
View Full Code Here

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

        setObjectProperty(name, value);
    }

    private void checkReadOnlyProperties() throws OpenwireException {
        if (readOnlyProperties) {
            throw new OpenwireException("Message properties are read-only");
        }
    }
View Full Code Here

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

        }
    }

    protected void checkReadOnlyBody() throws OpenwireException {
        if (readOnlyBody) {
            throw new OpenwireException("Message body is read-only");
        }
    }
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
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.