|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object org.seasar.framework.aop.interceptors.AbstractInterceptor org.seasar.remoting.common.interceptor.RemotingInterceptor
リモートオブジェクトのメソッド呼び出しを行うためのインターセプタです。
このインターセプタはJavaインタフェースまたは抽象クラスに適用され、呼び出されたメソッドがターゲットによって実装されていない場合(抽象メソッド)に
Connector
に委譲することによりリモートオブジェクトのメソッド呼び出しを行います。
インターセプタはターゲットのコンポーネント定義から名前( <component>
要素の
name
属性の値)を取得し、その名前をリモートオブジェクトの名前として Connector.invoke(java.lang.String, java.lang.reflect.Method, java.lang.Object[])
を呼び出します。コンポーネント定義に名前が定義されていない場合は、コンポーネントの型名( <component>
要素の class
属性の値)からパッケージ名を除いた名前をリモートオブジェクトの名前とします。
コンポーネントの型名が定義されていない場合は、ターゲットオブジェクトのクラス名からパッケージ名を除いた名前をリモートオブジェクトの名前とします。
もしプロパティ remoteName
(オプション)が設定されていれば、その値が常にリモートオブジェクトの名前として使用されます。
Connector
,
直列化された形式フィールドの概要 | |
protected Connector |
connector
|
protected String |
remoteName
|
コンストラクタの概要 | |
RemotingInterceptor()
|
メソッドの概要 | |
protected String |
getRemoteName(MethodInvocation invocation)
リモートオブジェクトの名前を返します。 |
Object |
invoke(MethodInvocation invocation)
ターゲットのメソッドが起動された時に呼び出されます。 |
void |
setConnector(Connector connector)
リモート呼び出しを実行する Connector を設定します。 |
void |
setRemoteName(String remoteName)
リモートオブジェクトの名前を設定します。 |
クラス org.seasar.framework.aop.interceptors.AbstractInterceptor から継承したメソッド |
createProxy, getComponentDef, getTargetClass |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected Connector connector
protected String remoteName
コンストラクタの詳細 |
public RemotingInterceptor()
メソッドの詳細 |
public void setConnector(Connector connector)
Connector
を設定します。このプロパティは必須です。
connector
- リモート呼び出しを実行する Connector
public void setRemoteName(String remoteName)
remoteName
- リモートオブジェクトの名前public Object invoke(MethodInvocation invocation) throws Throwable
Connector
に委譲します。
具象メソッドならターゲットのメソッドを呼び出します。
invocation
- メソッドの起動情報
Throwable
protected String getRemoteName(MethodInvocation invocation)
remoteName
が設定されていればその値。
invocation
- メソッドの起動情報
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |