2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to you under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.shale.dialog;
19  
20  /***
21   * <p>JavaBeans event listener for events on a {@link DialogContextManager}
22   * instance.</p>
23   *
24   * <p><strong>IMPLEMENTATION NOTE</strong> - Implementations of this interface
25   * will be stored in session scope, so they should be serializable.</p>
26   *
27   * @since 1.0.4
28   */
29  public interface DialogContextManagerListener {
30      
31  
32      // ------------------------------------------------ Coarse Grained Callbacks
33  
34  
35      /***
36       * <p>Handle the case where a new {@link DialogContext} instance has
37       * been created.  This event will be fired <strong>before</strong> the
38       * instance has been started; however, it is legitimate to do things
39       * like register fine grained listeners on this instance.</p>
40       *
41       * @param context The {@link DialogContext} instance being created
42       */
43      public void onCreate(DialogContext context);
44  
45  
46      /***
47       * <p>Handle the case where a new {@link DialogContext} instance has
48       * been removed.  This event will be fired <strong>after</strong> the
49       * instance has been stopped; however, it is legitimate to do things
50       * like deregister fine grained listeners on this instance.</p>
51       *
52       * @param context The {@link DialogContext} instance being created
53       */
54      public void onRemove(DialogContext context);
55  
56  
57      // --------------------------------------------------------------- Ownership
58  
59  
60      /***
61       * <p>Return the {@link DialogContextManager} instance associated with
62       * this {@link DialogContextManagerListener}.</p>
63       */
64      public DialogContextManager getDialogContextManager();
65  
66  
67      /***
68       * <p>Set the {@link DialogContextManager} instance associated with
69       * this {@link DialogContextManagerListener}.</p>
70       *
71       * @param manager The new {@link DialogContextManager}
72       */
73      public void setDialogContextManager(DialogContextManager manager);
74  
75  
76  }