Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / utils / IObjectReader.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.sal.utils;
11
12 import java.io.FileNotFoundException;
13 import java.io.IOException;
14 import java.io.ObjectInputStream;
15
16 /**
17  * This interface is needed to allow object reconstruction when reading serialized objects from
18  * inside a package other than the one where ObjectReader is defined (otherwise you hit the
19  * java.lang.ClassNotFoundException). This interface will allow to deserialize a class from inside
20  * the package where the class is defined. All the exception handling can still happen in
21  * ObjectReader and the implementer of IObjectReader only need to throws such exceptions
22  *
23  *
24  *
25  */
26 public interface IObjectReader {
27     public Object readObject(ObjectInputStream ois)
28             throws FileNotFoundException, IOException, ClassNotFoundException;
29 }