@DeprecatedSE public abstract class RemoteInvocationSerializingExporter extends RemoteInvocationBasedExporter implements InitializingBean
RemoteInvocation オブジェクトを明示的にデシリアライズし、RemoteInvocation の HTTP インボーカーなどの RemoteInvocationResult オブジェクトをシリアライズするリモートサービスエクスポーターの抽象基本クラス。たとえば、Spring の HTTP インボーカー。ObjectInputStream および ObjectOutputStream 処理のテンプレートメソッドを提供します。
| 修飾子と型 | フィールドと説明 |
|---|---|
static StringSE | CONTENT_TYPE_SERIALIZED_OBJECT 使用すべきではありません。 デフォルトのコンテンツ型: "application/x-java-serialized-object". |
logger| コンストラクターと説明 |
|---|
RemoteInvocationSerializingExporter() 使用すべきではありません。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet() 使用すべきではありません。 |
protected ObjectInputStreamSE | createObjectInputStream(InputStreamSE is) 使用すべきではありません。 指定された InputStream の ObjectInputStream を作成します。 |
protected ObjectOutputStreamSE | createObjectOutputStream(OutputStreamSE os) 使用すべきではありません。 指定された OutputStream の ObjectOutputStream を作成します。 |
protected RemoteInvocation | doReadRemoteInvocation(ObjectInputStreamSE ois) 使用すべきではありません。 指定された ObjectInputStream から呼び出し結果オブジェクトの実際の読み取りを実行します。 |
protected void | doWriteRemoteInvocationResult(RemoteInvocationResult result, ObjectOutputStreamSE oos) 使用すべきではありません。 指定された ObjectOutputStream への指定された呼び出し結果オブジェクトの実際の書き込みを実行します。 |
StringSE | getContentType() 使用すべきではありません。 リモート呼び出しレスポンスの送信に使用するコンテンツ型を返します。 |
protected ObjectSE | getProxy() 使用すべきではありません。 |
boolean | isAcceptProxyClasses() 使用すべきではありません。 プロキシクラスの逆直列化を受け入れるかどうかを返します。 |
void | prepare() 使用すべきではありません。 このサービスエクスポーターを初期化します。 |
void | setAcceptProxyClasses(boolean acceptProxyClasses) 使用すべきではありません。 プロキシクラスの逆直列化を受け入れるかどうかを設定します。 |
void | setContentType(StringSE contentType) 使用すべきではありません。 リモート呼び出しレスポンスの送信に使用するコンテンツ型を指定します。 |
getRemoteInvocationExecutor, invoke, invokeAndCreateResult, setRemoteInvocationExecutorcheckService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, setInterceptors, setRegisterTraceInterceptor, setService, setServiceInterfacegetBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoadercloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic RemoteInvocationSerializingExporter()
public void setContentType(StringSE contentType)
デフォルトは "application/x-java-serialized-object" です。
public StringSE getContentType()
public void setAcceptProxyClasses(boolean acceptProxyClasses)
デフォルトは "true" です。セキュリティ対策として無効にすることができます。
public boolean isAcceptProxyClasses()
public void afterPropertiesSet()
InitializingBeanBeanFactoryAware、ApplicationContextAware などを満たした後、包含 BeanFactory によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean の afterPropertiesSet public void prepare()
protected final ObjectSE getProxy()
protected ObjectInputStreamSE createObjectInputStream(InputStreamSE is) throws IOExceptionSE
デフォルトの実装では、Spring CodebaseAwareObjectInputStream が作成されます。
is - 読み込み元の InputStreamIOExceptionSE - ObjectInputStream の作成が失敗した場合 protected RemoteInvocation doReadRemoteInvocation(ObjectInputStreamSE ois) throws IOExceptionSE, ClassNotFoundExceptionSE
デフォルトの実装は、単に ObjectInputStream.readObject()SE を呼び出します。暗号化対応ホルダーなど、プレーンな呼び出しではなく、カスタムラッパーオブジェクトの逆直列化でオーバーライドできます。
ois - 読み込み元の ObjectInputStreamIOExceptionSE - I/O 障害の場合 ClassNotFoundExceptionSE - 転送されたクラスのケースがローカル ClassLoader で見つからない場合 protected ObjectOutputStreamSE createObjectOutputStream(OutputStreamSE os) throws IOExceptionSE
デフォルトの実装では、プレーンな ObjectOutputStreamSE が作成されます。
os - 書き込む OutputStreamIOExceptionSE - ObjectOutputStream の作成が失敗した場合 protected void doWriteRemoteInvocationResult(RemoteInvocationResult result, ObjectOutputStreamSE oos) throws IOExceptionSE
デフォルトの実装は、単に ObjectOutputStream.writeObject(java.lang.Object)SE を呼び出します。暗号化対応ホルダーなどの単純な呼び出しではなく、カスタムラッパーオブジェクトの直列化のためにオーバーライドできます。
result - RemoteInvocationResult オブジェクト oos - 書き込む ObjectOutputStreamIOExceptionSE - I/O メソッドによってスローされた場合