|
Restlet Framework 2.2.2 Google App Engine |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Restlet
org.restlet.routing.Router
org.restlet.routing.VirtualHost
org.restlet.ext.spring.SpringHost
public class SpringHost
Virtual host that is easily configurable with Spring. Here is a usage example:
<bean id="virtualHost" class="org.restlet.ext.spring.SpringHost"> <constructor-arg ref="component" /> <property name="hostDomain" value="mydomain.com|www.mydomain.com" /> <property name="attachments"> <map> <entry key="/"> <ref bean="application" /> </entry> </map> </property> </bean>Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.
Field Summary |
---|
Fields inherited from class org.restlet.routing.Router |
---|
MODE_BEST_MATCH, MODE_CUSTOM, MODE_FIRST_MATCH, MODE_LAST_MATCH, MODE_NEXT_MATCH, MODE_RANDOM_MATCH |
Constructor Summary | |
---|---|
SpringHost(Component component)
Constructor. |
|
SpringHost(Context context)
Constructor. |
Method Summary | |
---|---|
void |
setAttachment(String path,
Object route)
Sets a route to attach. |
void |
setAttachments(Map<String,Object> routes)
Sets the map of routes to attach. |
void |
setDefaultAttachment(Object route)
Sets the default route to attach. |
Methods inherited from class org.restlet.routing.VirtualHost |
---|
attach, attach, attachDefault, checkContext, createFinder, createRoute, getCurrent, getHostDomain, getHostPort, getHostScheme, getIpAddress, getLocalHostAddress, getLocalHostName, getResourceDomain, getResourcePort, getResourceScheme, getServerAddress, getServerPort, setContext, setCurrent, setHostDomain, setHostPort, setHostScheme, setResourceDomain, setResourcePort, setResourceScheme, setServerAddress, setServerPort |
Methods inherited from class org.restlet.routing.Router |
---|
attach, attach, attach, attach, attachDefault, createRoute, detach, detach, doHandle, getCustom, getDefaultMatchingMode, getDefaultMatchingQuery, getDefaultRoute, getMatchingMode, getMaxAttempts, getNext, getRequiredScore, getRetryDelay, getRoutes, getRoutingMode, handle, logRoute, redirectPermanent, redirectSeeOther, redirectTemporary, setDefaultMatchingMode, setDefaultMatchingQuery, setDefaultRoute, setMaxAttempts, setRequiredScore, setRetryDelay, setRoutes, setRoutingMode, start, stop |
Methods inherited from class org.restlet.Restlet |
---|
finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwner |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringHost(Component component)
component
- The parent component.public SpringHost(Context context)
context
- The parent context.Method Detail |
---|
public void setAttachments(Map<String,Object> routes)
ServerResource
subclasses (as Class
instances or as qualified class names).
routes
- The map of routes to attach.public void setAttachment(String path, Object route)
ServerResource
subclasse (as
Class
instances or as qualified class names).
path
- The attachment URI path.route
- The route object to attach.public void setDefaultAttachment(Object route)
ServerResource
subclasses (as Class
instances
or as qualified class names).
route
- The default route to attach.
|
Restlet Framework 2.2.2 Google App Engine |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |