com.caucho.resin
Class ServletProtocolEmbed

java.lang.Object
  extended by com.caucho.resin.ServletProtocolEmbed

public class ServletProtocolEmbed
extends java.lang.Object

Embeddable version of a servlet remoting protocol like hessian or burlap. The service class can be any Java class. Typically the class will have an interface marked with a @javax.ejb.Remote annotation.

 WebAppEmbed webApp = new WebAppEmbed("/foo", "/var/www/foo");

 ServletMappingEmbed myService
   = new ServletMappingEmbed("my-service", "/service", "qa.Myservice");

 myService.setProtocol(new ServletProtocolEmbed("hessian"));

 webApp.addServletMapping(myService);

 resin.addWebApp(webApp);
 


Constructor Summary
ServletProtocolEmbed()
          Creates a new embedded servlet protocol
ServletProtocolEmbed(java.lang.String uri)
          Creates a new servlet protocol
 
Method Summary
 void addProperty(java.lang.String name, java.lang.Object value)
          Adds a property.
 void setUri(java.lang.String uri)
          Sets the protocol's uri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletProtocolEmbed

public ServletProtocolEmbed()
Creates a new embedded servlet protocol


ServletProtocolEmbed

public ServletProtocolEmbed(java.lang.String uri)
Creates a new servlet protocol

Parameters:
uri - the protocol uri, e.g. "hessian:" or "burlap:"
Method Detail

setUri

public void setUri(java.lang.String uri)
Sets the protocol's uri


addProperty

public void addProperty(java.lang.String name,
                        java.lang.Object value)
Adds a property.