KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > ejb > spi > io > J2EEObjectStreamFactory


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
24 package com.sun.ejb.spi.io;
25
26 import java.io.*;
27 import java.security.*;
28 import java.rmi.*;
29 import javax.ejb.*;
30 import javax.naming.*;
31
32 import java.util.logging.*;
33 import com.sun.logging.*;
34
35 /**
36  *
37  * A Factory interface for creating an Object{Input | Output}Stream that
38  * allows serialization / de-serialization of "standard"
39  * J2EE Objects like EJBLocalObject, JNDIContext, UserTransaction etc.
40  *
41  * @author Mahesh Kannan
42  */

43 public interface J2EEObjectStreamFactory {
44
45     /**
46      *
47      * Obtain an ObjectOutputStream that allows serialization
48      * of a graph of objects. The objects can be plain Serializable objects
49      * or can be converted into Serializable objects using
50      * the handler
51      *
52      *@throws IOException when the serialziation fails
53      *@return an ObjectOutputStream that can be used to serialize objects
54      */

55     public ObjectOutputStream createObjectOutputStream(OutputStream os,
56             boolean replaceObject, NonSerializableObjectHandler handler)
57         throws IOException;
58
59     /**
60      *
61      * Obtain an ObjectInputStream that allows de-serialization
62      * of a graph of objects.
63      *
64      *@throws IOException when the de-serialziation fails
65      *@return an ObjectInputStream that can be used to deserialize objects
66      */

67     public ObjectInputStream createObjectInputStream(InputStream is,
68             boolean resolveObject, ClassLoader JavaDoc loader)
69         throws Exception JavaDoc;
70
71 }
72
Popular Tags