public abstract class RemoteInvocationBasedAccessor extends UrlBasedRemoteAccessor
RemoteInvocation
オブジェクトの直列化に基づく リモートサービスアクセサーの抽象基本クラス。デフォルトの戦略として DefaultRemoteInvocationFactory
を持つ "remoteInvocationFactory" プロパティを提供します。logger
コンストラクターと説明 |
---|
RemoteInvocationBasedAccessor() |
修飾子と型 | メソッドと説明 |
---|---|
protected RemoteInvocation | createRemoteInvocation(MethodInvocation methodInvocation) 指定された AOP メソッド呼び出し用に新しい RemoteInvocation オブジェクトを作成します。 |
RemoteInvocationFactory | getRemoteInvocationFactory() このアクセサーによって使用される RemoteInvocationFactory を返します。 |
protected ObjectSE | recreateRemoteInvocationResult(RemoteInvocationResult result) 指定された RemoteInvocationResult オブジェクトに含まれる呼び出し結果を再作成します。 |
void | setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory) このアクセサーに使用する RemoteInvocationFactory を設定します。 |
afterPropertiesSet, getServiceUrl, setServiceUrl
getServiceInterface, setServiceInterface
getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
DefaultRemoteInvocationFactory
です。カスタム呼び出しファクトリは、ユーザー資格情報など、さらにコンテキスト情報を呼び出しに追加できます。
public RemoteInvocationFactory getRemoteInvocationFactory()
protected RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation)
デフォルトの実装は、構成された RemoteInvocationFactory
に委譲します。これは、追加の呼び出しパラメーター(ユーザー資格情報など)を含むカスタム RemoteInvocation サブクラスを提供するために、サブクラスでオーバーライドできます。
このメソッドをオーバーライドするのではなく、再利用可能な戦略としてカスタム RemoteInvocationFactory を構築することが望ましいことに注意してください。
methodInvocation
- 現在の AOP メソッドの呼び出し RemoteInvocationFactory.createRemoteInvocation(org.aopalliance.intercept.MethodInvocation)
protected ObjectSE recreateRemoteInvocationResult(RemoteInvocationResult result) throws ThrowableSE
デフォルトの実装では、デフォルトの recreate()
メソッドを呼び出します。これをサブクラスでオーバーライドして、カスタムの再作成を提供し、返された結果オブジェクトを処理する可能性があります。
result
- 再作成する RemoteInvocationResultThrowableSE
- 呼び出し結果が例外の場合 RemoteInvocationResult.recreate()