|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectorg.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 java.lang.String |
remoteName
|
| コンストラクタの概要 | |
RemotingInterceptor()
|
|
| メソッドの概要 | |
protected java.lang.String |
getRemoteName(org.aopalliance.intercept.MethodInvocation invocation)
リモートオブジェクトの名前を返します。 |
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation)
ターゲットのメソッドが起動された時に呼び出されます。 |
void |
setConnector(Connector connector)
リモート呼び出しを実行する Connectorを設定します。 |
void |
setRemoteName(java.lang.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 java.lang.String remoteName
| コンストラクタの詳細 |
public RemotingInterceptor()
| メソッドの詳細 |
public void setConnector(Connector connector)
Connectorを設定します。このプロパティは必須です。
connector - リモート呼び出しを実行する Connectorpublic void setRemoteName(java.lang.String remoteName)
remoteName - リモートオブジェクトの名前
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws java.lang.Throwable
Connectorに委譲します。
具象メソッドならターゲットのメソッドを呼び出します。
invocation - メソッドの起動情報
java.lang.Throwableprotected java.lang.String getRemoteName(org.aopalliance.intercept.MethodInvocation invocation)
remoteName が設定されていればその値。
invocation - メソッドの起動情報
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||