public class SpringHost extends VirtualHost
<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.MODE_BEST_MATCH, MODE_CUSTOM, MODE_FIRST_MATCH, MODE_LAST_MATCH, MODE_NEXT_MATCH, MODE_RANDOM_MATCH| Constructor and Description |
|---|
SpringHost(Component component)
Constructor.
|
SpringHost(Context context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setAttachment(java.lang.String path,
java.lang.Object route)
Sets a route to attach.
|
void |
setAttachments(java.util.Map<java.lang.String,java.lang.Object> routes)
Sets the map of routes to attach.
|
void |
setDefaultAttachment(java.lang.Object route)
Sets the default route to attach.
|
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, setServerPortattach, 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, stopfinalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwnerpublic SpringHost(Component component)
component - The parent component.public SpringHost(Context context)
context - The parent context.public void setAttachment(java.lang.String path,
java.lang.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 setAttachments(java.util.Map<java.lang.String,java.lang.Object> routes)
ServerResource
subclasses (as Class instances or as qualified class names).routes - The map of routes to attach.public void setDefaultAttachment(java.lang.Object route)
ServerResource subclasses (as Class instances
or as qualified class names).route - The default route to attach.Copyright © 2005-2024 Restlet.