KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > webflow > execution > support > FlowExecutionRedirect


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.springframework.webflow.execution.support;
17
18 import java.io.ObjectStreamException JavaDoc;
19
20 import org.springframework.webflow.engine.ViewState;
21 import org.springframework.webflow.execution.ViewSelection;
22
23 /**
24  * Concrete response type that refreshes an application view by redirecting
25  * to an <i>existing</i>, active Spring Web Flow execution at a unique
26  * SWF-specific <i>flow execution URL</i>. This enables the triggering of
27  * post-redirect-get semantics from within an <i>active</i> flow execution.
28  * <p>
29  * Once the redirect response is issued a new request is initiated by the
30  * browser targeted at the flow execution URL. The URL is stabally refreshable
31  * (and bookmarkable) while the conversation remains active, safely triggering a
32  * {@link ViewState#refresh(org.springframework.webflow.execution.RequestContext)}
33  * on each access.
34  *
35  * @author Keith Donald
36  * @author Erwin Vervaet
37  */

38 public final class FlowExecutionRedirect extends ViewSelection {
39
40     /**
41      * The single instance of this class.
42      */

43     public static final FlowExecutionRedirect INSTANCE = new FlowExecutionRedirect();
44
45     /**
46      * Avoid instantiation.
47      */

48     private FlowExecutionRedirect() {
49     }
50
51     // resolve the singleton instance
52
private Object JavaDoc readResolve() throws ObjectStreamException JavaDoc {
53         return INSTANCE;
54     }
55
56     public String JavaDoc toString() {
57         return "redirect:";
58     }
59 }
Popular Tags