public class SpringComponent extends Component
<bean id="component"
class="org.restlet.ext.spring.SpringComponent">
<property name="clientsList">
<list>
<value>file</value>
</list>
</property>
<property name="server" ref="server" />
<property name="defaultTarget" ref="application" />
<property name="hosts">
<list>
<ref bean="virtualHost" />
</list>
</property>
</bean>
<bean id="component.context"
class="org.springframework.beans.factory.config.PropertyPathFactoryBean" />
<bean id="server" class="org.restlet.ext.spring.SpringServer">
<constructor-arg value="http" />
<constructor-arg value="8111" />
<property name="parameters">
<props>
<prop key="key1">value1</prop>
<prop key="key2">value2</prop>
</props>
</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.| Constructor and Description |
|---|
SpringComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
setClient(java.lang.Object clientInfo)
Adds a client to the list of connectors.
|
void |
setClientsList(java.util.List<java.lang.Object> clients)
Sets the list of clients, either as protocol names, Protocol instances or
Client instances.
|
void |
setDefaultTarget(Restlet target)
Attaches a target Restlet to the default host.
|
void |
setServer(java.lang.Object serverInfo)
Adds a server to the list of connectors.
|
void |
setServersList(java.util.List<java.lang.Object> serversInfo)
Sets the list of servers, either as protocol names, Protocol instances or
Server instances.
|
getClients, getDefaultHost, getHosts, getInternalRouter, getLogService, getRealm, getRealms, getServers, getServices, getStatusService, getTaskService, handle, main, setClients, setContext, setDefaultHost, setHosts, setInternalRouter, setLogService, setRealms, setServers, setStatusService, setTaskService, start, startClients, startHelper, startRealms, startRouters, startServers, startServices, stop, stopClients, stopHelper, stopRealms, stopRouters, stopServers, stopServices, updateHostscreateFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwnerpublic void setClient(java.lang.Object clientInfo)
clientInfo - The client info.public void setClientsList(java.util.List<java.lang.Object> clients)
clients - The list of clients.public void setDefaultTarget(Restlet target)
target - The target Restlet.public void setServer(java.lang.Object serverInfo)
serverInfo - The server info.public void setServersList(java.util.List<java.lang.Object> serversInfo)
serversInfo - The list of servers.Copyright © 2005-2024 Restlet.