com.caucho.ejb.burlap
Class BurlapStubFactory

java.lang.Object
  extended by com.caucho.ejb.burlap.BurlapStubFactory
All Implemented Interfaces:
HessianRemoteResolver

public class BurlapStubFactory
extends java.lang.Object
implements HessianRemoteResolver

Factory for creating Burlap client stubs. The returned stub will call the remote object for all methods.

 String url = "http://localhost:8080/ejb/hello";
 HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);
 
After creation, the stub can be like a regular Java class. Because it makes remote calls, it can throw more exceptions than a Java class. In particular, it may throw protocol exceptions.


Constructor Summary
BurlapStubFactory()
           
 
Method Summary
 java.lang.Object create(java.lang.Class api, java.lang.String url)
          Creates a new proxy with the specified URL.
 AbstractHessianInput getBurlapInput(java.io.InputStream is)
           
 AbstractHessianOutput getBurlapOutput(java.io.OutputStream os)
           
 HessianRemoteResolver getRemoteResolver()
          Returns the remote resolver.
 Path getWorkPath()
           
 java.lang.Object lookup(java.lang.String type, java.lang.String url)
          Looks up a proxy object.
 void setWorkPath(Path path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BurlapStubFactory

public BurlapStubFactory()
Method Detail

getRemoteResolver

public HessianRemoteResolver getRemoteResolver()
Returns the remote resolver.


setWorkPath

public void setWorkPath(Path path)

getWorkPath

public Path getWorkPath()

create

public java.lang.Object create(java.lang.Class api,
                               java.lang.String url)
                        throws java.lang.Exception
Creates a new proxy with the specified URL. The returned object is a proxy with the interface specified by api.
 String url = "http://localhost:8080/ejb/hello");
 HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);
 

Throws:
java.lang.Exception

getBurlapInput

public AbstractHessianInput getBurlapInput(java.io.InputStream is)

getBurlapOutput

public AbstractHessianOutput getBurlapOutput(java.io.OutputStream os)

lookup

public java.lang.Object lookup(java.lang.String type,
                               java.lang.String url)
                        throws java.io.IOException
Looks up a proxy object.

Specified by:
lookup in interface HessianRemoteResolver
Throws:
java.io.IOException