com.caucho.hessian.HessianException Java Examples

The following examples show how to use com.caucho.hessian.HessianException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SqlDateDeserializer.java    From jvm-sandbox-repeater with Apache License 2.0 5 votes vote down vote up
public SqlDateDeserializer(Class cl)
{
  try {
    _cl = cl;
    _constructor = cl.getConstructor(new Class[] { long.class });
  } catch (NoSuchMethodException e) {
    throw new HessianException(e);
  }
}
 
Example #2
Source File: AnnotationSerializer.java    From jvm-sandbox-repeater with Apache License 2.0 5 votes vote down vote up
static HessianException error(Method method, Throwable cause)
{
  String msg = (method.getDeclaringClass().getSimpleName()
                + "." + method.getName() + "(): " + cause);

  throw new HessianMethodSerializationException(msg, cause);
}
 
Example #3
Source File: StringValueDeserializer.java    From jvm-sandbox-repeater with Apache License 2.0 5 votes vote down vote up
@Override
protected Object create(String value)
  throws IOException
{
  if (value == null)
    throw new IOException(_cl.getName() + " expects name.");

  try {
    return _constructor.newInstance(new Object[] { value });
  } catch (Exception e) {
    throw new HessianException(_cl.getName() + ": value=" + value + "\n" + e,
                               e);
  }
}
 
Example #4
Source File: BigDecimalSerializerFactory.java    From jvm-sandbox-repeater with Apache License 2.0 5 votes vote down vote up
private Object create(String value) throws IOException {
    try {
        return new BigDecimal(value);
    } catch (Exception e) {
        throw new HessianException(BigDecimal.class.getName() + ": value=" + value, e);
    }
}
 
Example #5
Source File: SqlDateDeserializer.java    From sofa-hessian with Apache License 2.0 5 votes vote down vote up
public SqlDateDeserializer(Class cl)
{
    try {
        _cl = cl;
        _constructor = cl.getConstructor(new Class[] { long.class });
    } catch (NoSuchMethodException e) {
        throw new HessianException(e);
    }
}
 
Example #6
Source File: AnnotationSerializer.java    From sofa-hessian with Apache License 2.0 5 votes vote down vote up
static HessianException error(Method method, Throwable cause)
{
    String msg = (method.getDeclaringClass().getSimpleName()
        + "." + method.getName() + "(): " + cause);

    throw new HessianMethodSerializationException(msg, cause);
}
 
Example #7
Source File: StringValueDeserializer.java    From sofa-hessian with Apache License 2.0 5 votes vote down vote up
@Override
protected Object create(String value)
    throws IOException
{
    if (value == null)
        throw new IOException(_cl.getName() + " expects name.");

    try {
        return _constructor.newInstance(new Object[] { value });
    } catch (Exception e) {
        throw new HessianException(_cl.getName() + ": value=" + value + "\n" + e,
            e);
    }
}
 
Example #8
Source File: HessianProtocol.java    From dubbo-2.6.5 with Apache License 2.0 4 votes vote down vote up
public HessianProtocol() {
    super(HessianException.class);
}
 
Example #9
Source File: HessianProtocol.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public HessianProtocol() {
    super(HessianException.class);
}
 
Example #10
Source File: HessianProtocol.java    From dubbox-hystrix with Apache License 2.0 4 votes vote down vote up
public HessianProtocol() {
    super(HessianException.class);
}
 
Example #11
Source File: HessianProtocol.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public HessianProtocol() {
    super(HessianException.class);
}
 
Example #12
Source File: HessianProtocol.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public HessianProtocol() {
    super(HessianException.class);
}