Package javax.websocket

Examples of javax.websocket.DecodeException


                String valueString = pathParameters.get(pathParam.getName());
                Object value = null;
                try {
                    value = Util.coerceToType(pathParam.getType(), valueString);
                } catch (Exception e) {
                    DecodeException de =  new DecodeException(valueString,
                            sm.getString(
                                    "pojoMethodMapping.decodePathParamFail",
                                    valueString, pathParam.getType()), e);
                    params = new Object[] { de };
                }
View Full Code Here


                message.get(array);
                ByteArrayInputStream bais = new ByteArrayInputStream(array);
                try {
                    return ((BinaryStream<?>) decoder).decode(bais);
                } catch (IOException ioe) {
                    throw new DecodeException(message, sm.getString(
                            "pojoMessageHandlerWhole.decodeIoFail"), ioe);
                }
            }
        }
        return null;
View Full Code Here

            } else {
                StringReader r = new StringReader(message);
                try {
                    return ((TextStream<?>) decoder).decode(r);
                } catch (IOException ioe) {
                    throw new DecodeException(message, sm.getString(
                            "pojoMessageHandlerWhole.decodeIoFail"), ioe);
                }
            }
        }
        return null;
View Full Code Here

                message.get(array);
                ByteArrayInputStream bais = new ByteArrayInputStream(array);
                try {
                    return ((BinaryStream<?>) decoder).decode(bais);
                } catch (IOException ioe) {
                    throw new DecodeException(message, sm.getString(
                            "pojoMessageHandlerWhole.decodeIoFail"), ioe);
                }
            }
        }
        return null;
View Full Code Here

    try {
      return (T) getConversionService().convert(message, getMessageType(), getType());
    }
    catch (ConversionException ex) {
      if (message instanceof String) {
        throw new DecodeException((String) message,
            "Unable to decode websocket message using ConversionService", ex);
      }
      if (message instanceof ByteBuffer) {
        throw new DecodeException((ByteBuffer) message,
            "Unable to decode websocket message using ConversionService", ex);
      }
      throw ex;
    }
  }
View Full Code Here

            Boolean result;

            try {
                result = Boolean.valueOf(s);
            } catch (Exception e) {
                throw new DecodeException(s, "Decoding failed", e);
            }

            return result;
        }
View Full Code Here

            Byte result;

            try {
                result = Byte.valueOf(s);
            } catch (Exception e) {
                throw new DecodeException(s, "Decoding failed", e);
            }

            return result;
        }
View Full Code Here

            Character result;

            try {
                result = s.charAt(0);
            } catch (Exception e) {
                throw new DecodeException(s, "Decoding failed", e);
            }

            return result;
        }
View Full Code Here

            Double result;

            try {
                result = Double.valueOf(s);
            } catch (Exception e) {
                throw new DecodeException(s, "Decoding failed", e);
            }

            return result;
        }
View Full Code Here

            Float result;

            try {
                result = Float.valueOf(s);
            } catch (Exception e) {
                throw new DecodeException(s, "Decoding failed", e);
            }

            return result;
        }
View Full Code Here

TOP

Related Classes of javax.websocket.DecodeException

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.