View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.myfaces.orchestra.conversation;
21  
22  /**
23   * Methods required to inform the user about some anomalies.
24   * <p>
25   * These problems can be due either to incorrect webapp development (incorrect use of Orchestra tags)
26   * or by something like a session timing out. In any case, when these problems happen they affect the
27   * user so need to be reported to the user in some way. However different apps may want to report
28   * problems in different ways; the concrete ConversationMessager object used is therefore configurable.
29   * <p>
30   * All methods on this class must be implemented in a thread-safe manner.
31   * <p>
32   * The instance used by Orchestra is controlled by the FrameworkAdapter. See 
33   * {@link org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter} for details.
34   */
35  public abstract class ConversationMessager
36  {
37      /**
38       * An exception happened, for example during invalidate action.
39       */
40      public void setConversationException(Throwable t)
41      {
42      }
43  
44      /**
45       * Display message about a not active conversation (close before the redirect).
46       */
47      public void setConversationNotActive(String name)
48      {
49      }
50  }