Package io.fabric8.gateway.handlers.detecting.protocol.openwire.support

Examples of io.fabric8.gateway.handlers.detecting.protocol.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


        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

        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

        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

        setObjectProperty(name, value);
    }

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

        }
    }

    protected void checkReadOnlyBody() throws OpenwireException {
        if (readOnlyBody) {
            throw new OpenwireException("Message body is read-only");
        }
    }
View Full Code Here

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

            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

            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

            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

TOP

Related Classes of io.fabric8.gateway.handlers.detecting.protocol.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.