Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.SerializerFactory


    this.os = os;

    _refs = null;

    if (_serializerFactory == null)
      _serializerFactory = new SerializerFactory();
  }
View Full Code Here


    _peekTag = -1;
    _refs = null;
    _replyFault = null;

    if (_serializerFactory == null)
      _serializerFactory = new SerializerFactory();
  }
View Full Code Here

   * <p>This will typically be passed in as an inner bean definition
   * of type <code>com.caucho.hessian.io.SerializerFactory</code>,
   * with custom bean property values applied.
   */
  public void setSerializerFactory(SerializerFactory serializerFactory) {
    this.serializerFactory = (serializerFactory != null ? serializerFactory : new SerializerFactory());
  }
View Full Code Here

    @Test
    public void client() throws MalformedURLException {
        final ClassLoader loader = Thread.currentThread().getContextClassLoader();
        final HessianProxyFactory clientFactory = new HessianProxyFactory(loader);
        final SerializerFactory factory = new SerializerFactory(loader);
        factory.setAllowNonSerializable(true);
        clientFactory.setSerializerFactory(factory);
        final CdiService client = CdiService.class.cast(clientFactory.create(CdiService.class, "http://127.0.0.1:" + port + "/web/hessian/service"));

        final Out out = client.call(new In("test"));
        assertThat(out, instanceOf(Out.class));
View Full Code Here

    @Test
    public void client() throws MalformedURLException {
        final ClassLoader loader = Thread.currentThread().getContextClassLoader();
        final HessianProxyFactory clientFactory = new HessianProxyFactory(loader);
        final SerializerFactory factory = new SerializerFactory(loader);
        factory.setAllowNonSerializable(true);
        clientFactory.setSerializerFactory(factory);
        final CdiService client = CdiService.class.cast(clientFactory.create(CdiService.class, "http://127.0.0.1:" + port + "/web/hessian/foo"));

        final Out out = client.call(new In("test"));
        assertThat(out, instanceOf(Out.class));
View Full Code Here

    @Test
    public void client() throws MalformedURLException {
        final ClassLoader loader = Thread.currentThread().getContextClassLoader();
        final HessianProxyFactory clientFactory = new HessianProxyFactory(loader);
        final SerializerFactory factory = new SerializerFactory(loader);
        factory.setAllowNonSerializable(true);
        clientFactory.setSerializerFactory(factory);
        final HessianWebService client = HessianWebService.class.cast(clientFactory.create(HessianWebService.class, "http://127.0.0.1:" + port + "/HessianServiceTest/hessian/" + MyHessianWebService.class.getSimpleName()));

        final Out out = client.call(new In("test"));
        assertThat(out, instanceOf(Out.class));
View Full Code Here

    _peekTag = -1;
    _refs = null;
    _replyFault = null;

    if (_serializerFactory == null)
      _serializerFactory = new SerializerFactory();
  }
View Full Code Here

  /**
   * Gets the serializer factory.
   */
  public SerializerFactory getSerializerFactory() {
    if (_serializerFactory == null)
      _serializerFactory = new SerializerFactory();

    return _serializerFactory;
  }
View Full Code Here

  public void service(String serviceName, HttpRequest req, HttpResponse res,
      ByteArrayOutputStream os) {
    byte[] bytes = req.getContent().array();//get request content
    InputStream is = new ByteArrayInputStream(bytes);

    SerializerFactory serializerFactory = getSerializerFactory();
    String username = null;
    String password = null;
    String[] authLink = getUsernameAndPassword(req);
    username = authLink[0].equals("")?null:authLink[0];
    password = authLink[1].equals("")?null:authLink[1];
View Full Code Here

        DataChannel channel = runtime.getChannel();

        RemoteService service = runtime.getInjector().getInstance(RemoteService.class);

        SerializerFactory serializerFactory = HessianConfig.createFactory(
                HessianService.SERVER_SERIALIZER_FACTORIES,
                channel.getEntityResolver());

        setAPIClass(RemoteService.class);
        setSerializerFactory(serializerFactory);
View Full Code Here

TOP

Related Classes of com.caucho.hessian.io.SerializerFactory

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.