|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
org.restlet.Router
org.restlet.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.Router |
---|
BEST, CUSTOM, FIRST, LAST, NEXT, RANDOM |
Constructor Summary | |
---|---|
SpringHost(Component component)
Constructor. |
|
SpringHost(Context context)
Constructor. |
Method Summary | |
---|---|
void |
setAttachments(java.util.Map<java.lang.String,java.lang.Object> routes)
Sets the map of routes to attach. |
Methods inherited from class org.restlet.VirtualHost |
---|
attach, attach, attachDefault, createFinder, createRoute, getCurrent, getHostDomain, getHostPort, getHostScheme, getIpAddress, getLocalHostAddress, getLocalHostName, getName, getResourceDomain, getResourcePort, getResourceScheme, getServerAddress, getServerPort, setCurrent, setHostDomain, setHostPort, setHostScheme, setName, setResourceDomain, setResourcePort, setResourceScheme, setServerAddress, setServerPort |
Methods inherited from class org.restlet.Router |
---|
attach, attachDefault, detach, getCustom, getDefaultMatchingMode, getDefaultMatchQuery, getDefaultRoute, getFinderClass, getMaxAttempts, getNext, getRequiredScore, getRetryDelay, getRoutes, getRoutingMode, handle, setDefaultMatchingMode, setDefaultMatchQuery, setDefaultRoute, setFinderClass, setMaxAttempts, setRequiredScore, setRetryDelay, setRoutes, setRoutingMode |
Methods inherited from class org.restlet.Restlet |
---|
getApplication, getContext, getLogger, init, isStarted, isStopped, setContext, start, stop |
Methods inherited from class org.restlet.Uniform |
---|
delete, delete, get, get, handle, head, head, options, options, post, post, put, put |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringHost(Component component)
component
- The parent component.public SpringHost(Context context)
context
- The context to use.Method Detail |
---|
public void setAttachments(java.util.Map<java.lang.String,java.lang.Object> routes)
routes
- The map of routes to attach.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |