Package com.caucho.hessian.client

Examples of com.caucho.hessian.client.HessianProxyFactory


  private RemoteJMX getProxy()
  {
    if (_jmxProxy == null) {
      try {
        HessianProxyFactory proxy = new HessianProxyFactory();
        proxy.getSerializerFactory().addFactory(new JMXSerializerFactory());
        _jmxProxy = (RemoteJMX) proxy.create(_url);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here


  private RemoteJMX getProxy()
  {
    if (_jmxProxy == null) {
      try {
        HessianProxyFactory proxy = new HessianProxyFactory();
        proxy.getSerializerFactory().addFactory(new JMXSerializerFactory());
        _jmxProxy = (RemoteJMX) proxy.create(_url);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

 
  public Object getProxy(Class serviceInterface, String url)
    throws MalformedURLException
  {
    // XXX Go through com.caucho.soa.transport.TransportFactory?
    HessianProxyFactory proxyFactory = getProxyFactory();

    return proxyFactory.create(serviceInterface, url);
  }
View Full Code Here

  }

  private HessianProxyFactory getProxyFactory()
  {
    if (_proxyFactory == null)
      _proxyFactory = new HessianProxyFactory();

    return _proxyFactory;
  }
View Full Code Here

    if (remoteServer != null && !remoteServer.endsWith("/")) {
      this.remoteServer = remoteServer + "/";
    } else {
      this.remoteServer = remoteServer;
    }
    factory = new HessianProxyFactory();
    factory.setConnectTimeout(connectTimeout);
    factory.setReadTimeout(readTimeout);
  }
View Full Code Here

    }
   
    @Test
    public void testServer() throws IOException {
        try {
            HessianProxyFactory proxyFactory = new HessianProxyFactory();
            IFirst service = (IFirst)proxyFactory.create(IFirst.class, "http://localhost:8085/hessian1");
            List<String> datas = service.getData("123", "ABC");
            for (int i = 0; i < datas.size(); i++) {
                System.out.println(datas.get(i));
            }
        } catch (Exception e) {
View Full Code Here

    }
   
    @Test
    public void testServer() throws IOException {
        try {
            HessianProxyFactory proxyFactory = new HessianProxyFactory();
            ISecond service = (ISecond)proxyFactory.create(ISecond.class, "http://localhost:8085/hessian2");
            String str = service.getString("XYZ");
            System.out.println(str);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
View Full Code Here

    public Message invoke(Message msg) {
        try {
            Method method = ((JavaOperation)msg.getOperation()).getJavaMethod();
            Object[] args = msg.getBody();

            HessianProxyFactory proxyFactory = new HessianProxyFactory();
            Object service = proxyFactory.create(loadClass(homeImpl.toString()), serviceURL);
            Object result = null;
            result = method.invoke(service, args);
            msg.setBody(result);
        } catch (Throwable e) {
            e.printStackTrace();
View Full Code Here

   * If not specified, a default HessianProxyFactory will be created.
   * <p>Allows to use an externally configured factory instance,
   * in particular a custom HessianProxyFactory subclass.
   */
  public void setProxyFactory(HessianProxyFactory proxyFactory) {
    this.proxyFactory = (proxyFactory != null ? proxyFactory : new HessianProxyFactory());
  }
View Full Code Here

   * If not specified, a default HessianProxyFactory will be created.
   * <p>Allows to use an externally configured factory instance,
   * in particular a custom HessianProxyFactory subclass.
   */
  public void setProxyFactory(HessianProxyFactory proxyFactory) {
    this.proxyFactory = (proxyFactory != null ? proxyFactory : new HessianProxyFactory());
  }
View Full Code Here

TOP

Related Classes of com.caucho.hessian.client.HessianProxyFactory

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.