net.sourceforge.hiveremoting.caucho
Class CauchoProxyFactory

java.lang.Object
  extended by net.sourceforge.hiveremoting.caucho.CauchoProxyFactory
All Implemented Interfaces:
org.apache.hivemind.ServiceImplementationFactory

public class CauchoProxyFactory
extends java.lang.Object
implements org.apache.hivemind.ServiceImplementationFactory

This service creates Proxys to remote services that are published through Caucho Hessian or Burlap protocols.

ServiceModel must be singleton

Note: how to dynamically define user/password for authentication?

The idea is to put them into System properties and use HiveMind SystemPropertiesSymbolSource to do the substitution at Registry construction time (please note this is not possible to have real dynamic user/ password definition after HiveMind Registry has been built).

In hivemind.xml, you would have:

 <contribution configuration-id="hivemind.SymbolSources">
     <source name="SystemProperties"
         class="org.apache.hivemind.impl.SystemPropertiesSymbolSource"/>
 </contribution>
 
 <implementation service-id="hiveboard.shared.WhiteBoardUserService">
     <invoke-factory service-id="hiveremoting.caucho.CauchoProxyFactory" 
                        model="singleton">
     <proxy url="http://server:8080/webapp/path"
         protocol="Hessian" user="${user}" password="${password}" />
     </invoke-factory>
 </implementation>
 
Then in your source code, you would have something like:
 Properties props = System.getProperties();
 props.setProperty("user", "myusername");
 props.setProperty("password", "mypassword");
 Registry registry = RegistryBuilder.constructDefaultRegistry();
 

Author:
Jean-Francois Poilpret

Constructor Summary
CauchoProxyFactory(CauchoProxyConfigurator configurator, com.caucho.hessian.io.SerializerFactory factory, int maxConnections, int maxConnectionsPerHost, boolean httpsStrictCertificateCheck)
           
 
Method Summary
 java.lang.Object createCoreServiceImplementation(org.apache.hivemind.ServiceImplementationFactoryParameters factoryParams)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CauchoProxyFactory

public CauchoProxyFactory(CauchoProxyConfigurator configurator,
                          com.caucho.hessian.io.SerializerFactory factory,
                          int maxConnections,
                          int maxConnectionsPerHost,
                          boolean httpsStrictCertificateCheck)
Method Detail

createCoreServiceImplementation

public java.lang.Object createCoreServiceImplementation(org.apache.hivemind.ServiceImplementationFactoryParameters factoryParams)
Specified by:
createCoreServiceImplementation in interface org.apache.hivemind.ServiceImplementationFactory