KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > jsfext > event > handlers > OutputType


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.tools.jsfext.event.handlers;
24
25
26 /**
27  * <p> This interface provides an abstraction for different locations for
28  * storing output from a handler. Implementations may store values in
29  * Session, request attributes, databases, etc.</p>
30  *
31  * @author Ken Paulsen (ken.paulsen@sun.com)
32  */

33 public interface OutputType {
34
35     /**
36      * <p> This method is responsible for retrieving the value of the Output
37      * from the destination that was specified by handler. 'key' may be
38      * null. In cases where it is not needed, it can be ignored. If it
39      * is needed, the implementation may either provide a default or
40      * throw an exception.</p>
41      *
42      * @param context The HandlerContext
43      *
44      * @param outDesc The IODescriptor for this Output value in
45      * which to obtain the value
46      *
47      * @param key The optional 'key' to use when retrieving the
48      * value from the OutputType
49      *
50      * @return The requested value.
51      */

52     public Object JavaDoc getValue(HandlerContext context, IODescriptor outDesc, String JavaDoc key);
53
54     /**
55      * <p> This method is responsible for setting the value of the Output
56      * to the destination that was specified by handler. 'key' may be
57      * null. In cases where it is not needed, it can be ignored. If it
58      * is needed, the implementation may either provide a default or
59      * throw an exception.</p>
60      *
61      * @param context The HandlerContext
62      *
63      * @param outDesc The IODescriptor for this Output value in
64      * which to obtain the value
65      *
66      * @param key The optional 'key' to use when setting the
67      * value from the OutputType
68      *
69      * @param value The value to set
70      */

71     public void setValue(HandlerContext context, IODescriptor outDesc, String JavaDoc key, Object JavaDoc value);
72 }
73
Popular Tags