|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.orchestra.conversation.spring.AbstractSpringOrchestraScope
org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope
public class SpringConversationScope
Handles creation and lookup of any bean whose bean-definition specifies a scope that maps to an instance of this type.
A scope bean handles Spring-specific callbacks in order to locate or create any beans whose definition specifies that scope. A scope can also be thought of as a "conversation template", as this object is responsible for creating a conversation when one is needed but does not yet exist.
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> <property name="scopes"> <map> <entry key="conversation.manual"> <bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"> <property name="advices"> <list> <ref bean="persistentContextConversationInterceptor" /> </list> </property> </bean> </entry> </map> </property> </bean> <bean id="persistentContextConversationInterceptor" class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor"> <property name="persistenceContextFactory" ref="yourPersistentContextFactory" /> </bean>
As shown above, a list of AOP Advices can be specified for the scope, in which case each of the advices gets configured for any bean declared with this scope.
Field Summary | |
---|---|
static String |
LIFETIME_ACCESS
|
static String |
LIFETIME_FLASH
Deprecated. Use LIFETIME_ACCESS instead. |
static String |
LIFETIME_MANUAL
|
Constructor Summary | |
---|---|
SpringConversationScope()
|
Method Summary | |
---|---|
Conversation |
createConversation(ConversationContext context,
String name)
Implementation of ConversationFactory interface. |
String |
getLifetime()
See setLifetime(java.lang.String) . |
Integer |
getTimeout()
See setTimeout(java.lang.Integer) . |
protected void |
initAspects(Conversation conversation)
Add aspects to a newly-created conversation. |
protected void |
notifyAccessConversation(Conversation conversation)
Mark the specified conversation as having been accessed. |
void |
setLifetime(String lifetime)
Must be one of "manual" or "access". |
void |
setTimeout(Integer timeout)
The timeout in minutes when the conversation will end. |
Methods inherited from class org.apache.myfaces.orchestra.conversation.spring.AbstractSpringOrchestraScope |
---|
assertSameScope, buildBeanName, defineBeanPostProcessors, get, getAdvices, getApplicationContext, getConversationForBean, getConversationId, getConversationNameForBean, getExplicitConversationName, getProxy, getRealBean, registerDestructionCallback, remove, setAdvices, setApplicationContext, setAutoProxy, setBeanFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LIFETIME_FLASH
public static final String LIFETIME_ACCESS
public static final String LIFETIME_MANUAL
Constructor Detail |
---|
public SpringConversationScope()
Method Detail |
---|
public Integer getTimeout()
setTimeout(java.lang.Integer)
.
public void setTimeout(Integer timeout)
ConversationTimeoutableAspect.timeout
for the default timeout.
public String getLifetime()
setLifetime(java.lang.String)
.
public void setLifetime(String lifetime)
Defaults to "manual".
Note that "flash" is also supported as an alias for "access", for reasons of backwards compatibility with release 1.0.
public Conversation createConversation(ConversationContext context, String name)
protected void initAspects(Conversation conversation)
Subclasses are expected to call super.initAspects, then make zero or more calls to conversation.addAspect.
protected void notifyAccessConversation(Conversation conversation)
This affects conversation timeouts, and the removal of access-scoped conversations.
notifyAccessConversation
in class AbstractSpringOrchestraScope
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |