|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Restlet
org.restlet.Component
org.restlet.ext.spring.SpringComponent
public class SpringComponent
Component that is easily configurable from Spring. Here is a usage example:
<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 Summary | |
|---|---|
SpringComponent()
|
|
| Method Summary | |
|---|---|
void |
setClient(Object clientInfo)
Adds a client to the list of connectors. |
void |
setClientsList(List<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(Object serverInfo)
Adds a server to the list of connectors. |
void |
setServersList(List<Object> serversInfo)
Sets the list of servers, either as protocol names, Protocol instances or Server instances. |
| Methods inherited from class org.restlet.Component |
|---|
getClients, getDefaultHost, getHosts, getInternalRouter, getLogService, getRealm, getRealms, getServers, getServices, getStatusService, handle, main, setClients, setContext, setDefaultHost, setHosts, setInternalRouter, setLogService, setRealms, setServers, setStatusService, start, startClients, startHelper, startRealms, startRouters, startServers, startServices, stop, stopClients, stopHelper, stopRealms, stopRouters, stopServers, stopServices, updateHosts |
| Methods inherited from class org.restlet.Restlet |
|---|
createFinder, 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 SpringComponent()
| Method Detail |
|---|
public void setClient(Object clientInfo)
clientInfo - The client info.public void setClientsList(List<Object> clients)
clients - The list of clients.public void setDefaultTarget(Restlet target)
target - The target Restlet.public void setServer(Object serverInfo)
serverInfo - The server info.public void setServersList(List<Object> serversInfo)
serversInfo - The list of servers.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||