| 1 |
/* |
|---|
| 2 |
* Copyright(c) 2008 the Spark project. |
|---|
| 3 |
* |
|---|
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 5 |
* you may not use this file except in compliance with the License. |
|---|
| 6 |
* You may obtain a copy of the License at |
|---|
| 7 |
* |
|---|
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 9 |
* |
|---|
| 10 |
* Unless required by applicable law or agreed to in writing, software |
|---|
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
|---|
| 13 |
* either express or implied. See the License for the specific language |
|---|
| 14 |
* governing permissions and limitations under the License. |
|---|
| 15 |
*/ |
|---|
| 16 |
|
|---|
| 17 |
package { |
|---|
| 18 |
import flash.utils.Proxy; |
|---|
| 19 |
import flash.utils.flash_proxy; |
|---|
| 20 |
import jp.cohesion.common.IKernel; |
|---|
| 21 |
|
|---|
| 22 |
use namespace flash_proxy; |
|---|
| 23 |
|
|---|
| 24 |
/* == [Project Cohesion] =================================================== */ |
|---|
| 25 |
|
|---|
| 26 |
/** |
|---|
| 27 |
* |
|---|
| 28 |
* |
|---|
| 29 |
* @author $Author$ |
|---|
| 30 |
* @revision $Rev$ |
|---|
| 31 |
* @date $Date$ |
|---|
| 32 |
*/ |
|---|
| 33 |
public dynamic class ModuleProxy extends Proxy { |
|---|
| 34 |
// コンストラクタ /////////////////////////////////////////////////////////////////// |
|---|
| 35 |
// Constructors // |
|---|
| 36 |
///////////////////////////////////////////////////////////////////////////////////// |
|---|
| 37 |
|
|---|
| 38 |
/** |
|---|
| 39 |
* |
|---|
| 40 |
* @param kernel |
|---|
| 41 |
* @param serviceName |
|---|
| 42 |
*/ |
|---|
| 43 |
public function ModuleProxy(kernel:IKernel, moduleName:String) { |
|---|
| 44 |
this.kernel = kernel; |
|---|
| 45 |
this.moduleName = moduleName; |
|---|
| 46 |
} |
|---|
| 47 |
|
|---|
| 48 |
/** */ |
|---|
| 49 |
private var kernel:IKernel; |
|---|
| 50 |
|
|---|
| 51 |
/** */ |
|---|
| 52 |
private var moduleName:String; |
|---|
| 53 |
|
|---|
| 54 |
/** |
|---|
| 55 |
* |
|---|
| 56 |
* @param methodName |
|---|
| 57 |
* @param ...args |
|---|
| 58 |
* @return |
|---|
| 59 |
*/ |
|---|
| 60 |
flash_proxy override function callProperty(methodName:*, ...args):* { |
|---|
| 61 |
kernel.execute(this.moduleName, methodName.toString(), args); |
|---|
| 62 |
} |
|---|
| 63 |
|
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
} |
|---|