|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.ejb.spi Interface HandleDelegate
public interface HandleDelegate
HandleDelegate 接口由 EJB 容器实现。javax.ejb.Handle 和 javax.ejb.HomeHandle 的可移植实现使用此接口。EJB 组件或客户端组件不使用它。它提供了一些方法来序列化和反序列化对流的 EJBObject 和 EJBHome 引用。
通过 JNDI 查找其保留名称 "java:comp/HandleDelegate" 获得 HandleDelegate 对象。
The HandleDelegate interface is implemented by the EJB container. It is used by portable implementations of javax.ejb.Handle and javax.ejb.HomeHandle. It is not used by EJB components or by client components. It provides methods to serialize and deserialize EJBObject and EJBHome references to streams.
The HandleDelegate object is obtained by JNDI lookup at the reserved name "java:comp/HandleDelegate".
Method Summary | |
---|---|
EJBHome |
readEJBHome(ObjectInputStream istream)
Deserialize the EJBHome reference corresponding to a HomeHandle. |
EJBObject |
readEJBObject(ObjectInputStream istream)
Deserialize the EJBObject reference corresponding to a Handle. |
void |
writeEJBHome(EJBHome ejbHome,
ObjectOutputStream ostream)
Serialize the EJBHome reference corresponding to a HomeHandle. |
void |
writeEJBObject(EJBObject ejbObject,
ObjectOutputStream ostream)
Serialize the EJBObject reference corresponding to a Handle. |
Method Detail |
---|
public void
writeEJBObject(EJBObject ejbObject, java.io.ObjectOutputStream ostream) throws java.io.IOException
序列化相应 Handle 的 EJBObject 引用。
此方法从可移植 Handle 实现类的 writeObject 方法调用。ostream 对象就是传入 Handle 类的 writeObject 的那个对象。
ejbObject | 要序列化的 EJBObject 引用。 |
ostream | 输出流。 |
Throws | java.io.IOException: 由于系统级失败无法序列化 EJBObject。 |
writeEJBObject
void writeEJBObject(EJBObject ejbObject, ObjectOutputStream ostream) throws IOException
- Serialize the EJBObject reference corresponding to a Handle.
This method is called from the writeObject method of portable Handle implementation classes. The ostream object is the same object that was passed in to the Handle class's writeObject.
- Parameters:
ejbObject
- The EJBObject reference to be serialized.ostream
- The output stream.- Throws:
IOException
- The EJBObject could not be serialized because of a system-level failure.
public EJBObject
readEJBObject(java.io.ObjectInputStream istream) throws java.io.IOException, ClassNotFoundException
反序列化相应 Handle 的 EJBObject 引用。
readEJBObject 从可移植 Handle 实现类的 readObject 方法调用。istream 对象就是传入 Handle 类的 readObject 的那个对象。调用 readEJBObject 时,istream 必须指向流中可以读取 EJBObject 引用的那个位置。容器必须确保 EJBObject 引用能够在反序列化后立即执行调用。
istream | 输入流。 |
return | 反序列化的 EJBObject 引用。 |
Throws | java.io.IOException: 由于系统级失败无法反序列化 EJBObject。 |
Throws | ClassNotFoundException: 因为无法找到某些类,无法反序列化 EJBObject。 |
readEJBObject
EJBObject readEJBObject(ObjectInputStream istream) throws IOException, ClassNotFoundException
- Deserialize the EJBObject reference corresponding to a Handle.
readEJBObject is called from the readObject method of portable Handle implementation classes. The istream object is the same object that was passed in to the Handle class's readObject. When readEJBObject is called, istream must point to the location in the stream at which the EJBObject reference can be read. The container must ensure that the EJBObject reference is capable of performing invocations immediately after deserialization.
- Parameters:
istream
- The input stream.- Returns:
- The deserialized EJBObject reference.
- Throws:
IOException
- The EJBObject could not be deserialized because of a system-level failure.ClassNotFoundException
- The EJBObject could not be deserialized because some class could not be found.
public void
writeEJBHome(EJBHome ejbHome, java.io.ObjectOutputStream ostream) throws java.io.IOException
序列化相应 HomeHandle 的 EJBHome 引用。
此方法从可移植 HomeHandle 实现类的 writeObject 方法调用。ostream 对象就是传入 Handle 类的 writeObject 的那个对象。
ejbHome | 要序列化的 EJBHome 引用。 |
ostream | 输出流。 |
Throws | java.io.IOException: 由于系统级失败无法序列化 EJBObject。 |
writeEJBHome
void writeEJBHome(EJBHome ejbHome, ObjectOutputStream ostream) throws IOException
- Serialize the EJBHome reference corresponding to a HomeHandle.
This method is called from the writeObject method of portable HomeHandle implementation classes. The ostream object is the same object that was passed in to the Handle class's writeObject.
- Parameters:
ejbHome
- The EJBHome reference to be serialized.ostream
- The output stream.- Throws:
IOException
- The EJBObject could not be serialized because of a system-level failure.
public EJBHome
readEJBHome(java.io.ObjectInputStream istream) throws java.io.IOException, ClassNotFoundException
反序列化相应 HomeHandle 的 EJBHome 引用。
readEJBHome 从可移植 HomeHandle 实现类的 readObject 方法调用。istream 对象就是传入 HomeHandle 类的 readObject 的那个对象。调用 readEJBHome 时,istream 必须指向流中可以读取 EJBHome 引用的那个位置。容器必须确保 EJBHome 引用能够在反序列化后立即执行调用。
istream | 输入流。 |
return | 反序列化的 EJBHome 引用。 |
Throws | java.io.IOException: 由于系统级失败无法反序列化 EJBHome。 |
Throws | ClassNotFoundException: 因为无法找到某些类,无法反序列化 EJBHome。 |
readEJBHome
EJBHome readEJBHome(ObjectInputStream istream) throws IOException, ClassNotFoundException
- Deserialize the EJBHome reference corresponding to a HomeHandle.
readEJBHome is called from the readObject method of portable HomeHandle implementation classes. The istream object is the same object that was passed in to the HomeHandle class's readObject. When readEJBHome is called, istream must point to the location in the stream at which the EJBHome reference can be read. The container must ensure that the EJBHome reference is capable of performing invocations immediately after deserialization.
- Parameters:
istream
- The input stream.- Returns:
- The deserialized EJBHome reference.
- Throws:
IOException
- The EJBHome could not be deserialized because of a system-level failure.ClassNotFoundException
- The EJBHome could not be deserialized because some class could not be found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!