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

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


            if (data == null) {
                return null;
            }
            return new String(data, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new OpenwireException("Invalid UTF-8 encoding: " + e.getMessage());
        }
    }
View Full Code Here


            if (data == null) {
                return null;
            }
            return data.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new OpenwireException("Invalid UTF-8 encoding: " + e.getMessage());
        }
    }
View Full Code Here

    public boolean propertyExists(String name) throws OpenwireException {
        try {
            return this.getProperties().containsKey(name);
        } catch (IOException e) {
            throw new OpenwireException(e);
        }
    }
View Full Code Here

    public Enumeration getPropertyNames() throws OpenwireException {
        try {
            return new Vector<String>(this.getProperties().keySet()).elements();
        } catch (IOException e) {
            throw new OpenwireException(e);
        }
    }
View Full Code Here

            setter.set(this, value);
        } else {
            try {
                this.setProperty(name, value);
            } catch (IOException e) {
                throw new OpenwireException(e);
            }
        }
    }
View Full Code Here

        if (!valid) {

            if (Settings.enable_nested_map_and_list()) {
                if (!(value instanceof Map || value instanceof List)) {
                    throw new OpenwireException("Only objectified primitive objects, String, Map and List types are allowed but was: " + value + " type: " + value.getClass());
                }
            } else {
                throw new OpenwireException("Only objectified primitive objects and String types are allowed but was: " + value + " type: " + value.getClass());
            }
        }
    }
View Full Code Here

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

        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

        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

        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

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.