Package com.caucho.hessian4.io

Examples of com.caucho.hessian4.io.AbstractHessianInput


             new AnnotationInvocationHandler(_annType, valueMap));
            
    } catch (IOException e) {
      throw e;
    } catch (Exception e) {
      throw new HessianException(_annType.getName() + ":" + e, e);
    }
  }
View Full Code Here


  {
    try {
      _cl = cl;
      _constructor = cl.getConstructor(new Class[] { long.class });
    } catch (NoSuchMethodException e) {
      throw new HessianException(e);
    }
  }
View Full Code Here

      return ser;
    } catch (ClassNotFoundException e) {
      log.log(Level.ALL, e.toString(), e);
    } catch (Exception e) {
      throw new HessianException(e);
    }

    _customSerializerMap.put(cl.getName(), AbstractSerializer.NULL);

    return null;
View Full Code Here

      return ser;
    } catch (ClassNotFoundException e) {
      log.log(Level.ALL, e.toString(), e);
    } catch (Exception e) {
      throw new HessianException(e);
    }

    _customDeserializerMap.put(cl.getName(), AbstractDeserializer.NULL);

    return null;
View Full Code Here

        if (entry.getKey().isInterface())
          _serializerInterfaceMap.put(entry.getKey(), ser);
        else
          _serializerClassMap.put(entry.getKey().getName(), ser);
      } catch (Exception e) {
        throw new HessianException(e);
      }
    }

    classMap = new HashMap<Class,Class>();
    initSerializerFiles("META-INF/hessian/deserializers",
                        _deserializerFiles,
                        classMap,
                        Deserializer.class);

    for (Map.Entry<Class,Class> entry : classMap.entrySet()) {
      try {
        Deserializer ser = (Deserializer) entry.getValue().newInstance();

        if (entry.getKey().isInterface())
          _deserializerInterfaceMap.put(entry.getKey(), ser);
        else {
          _deserializerClassMap.put(entry.getKey().getName(), ser);
        }
      } catch (Exception e) {
        throw new HessianException(e);
      }
    }
  }
View Full Code Here

              log.fine(url + ": " + serializerName + " is not available in this context: " + getClassLoader());
              continue;
            }

            if (! type.isAssignableFrom(serializerClass))
              throw new HessianException(url + ": " + serializerClass.getName() + " is invalid because it does not implement " + type.getName());

            classMap.put(apiClass, serializerClass);
          }
        } finally {
          if (is != null)
            is.close();
        }
      }
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new HessianException(e);
    }
  }
View Full Code Here

      }
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      // log.log(Level.FINE, e.toString(), e);
      throw new HessianException(e);
    }

    Class<?> cl = getClass(obj);

    int ref = out.writeObjectBegin(cl.getName());
View Full Code Here

  repl = _writeReplace.invoke(_writeReplaceFactory, obj);
      else
  repl = _writeReplace.invoke(obj);

      if (obj == repl)
        throw new HessianException(this + ": Hessian writeReplace error.  The writeReplace method (" + _writeReplace + ") must not return the same object: " + obj);

      out.removeRef(obj);

      out.writeObject(repl);
View Full Code Here

    try {
      return new ObjectName(value);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new HessianException(e);
    }
  }
View Full Code Here

      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);
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.hessian4.io.AbstractHessianInput

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.