1 /* 2 * Copyright the original author or authors. 3 * 4 * Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (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.mozilla.org/MPL/MPL-1.1.html 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, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 import org.as2lib.core.BasicClass; 18 import org.as2lib.env.overload.Overload; 19 import org.as2lib.env.except.UnsupportedOperationException; 20 21 /** 22 * {@code AbstractClientServiceProxyFactory} offers default implementations of 23 * methods needed when implementing the {@link ClientServiceProxyFactory} interface. 24 * 25 * @author Simon Wacker 26 */ 27 class org.as2lib.io.conn.core.client.AbstractClientServiceProxyFactory extends BasicClass { 28 29 /** 30 * Private constructor. 31 */ 32 private function AbstractClientServiceProxyFactory(Void) { 33 } 34 35 /** 36 * @overload getClientServiceProxyByUrl 37 * @overload #getClientServiceProxyByUrlAndType 38 * @see ClientServiceProxyFactory#getClientServiceProxy 39 */ 40 public function getClientServiceProxy() { 41 var o:Overload = new Overload(this); 42 o.addHandler([String], this["getClientServiceProxyByUrl"]); 43 o.addHandler([String, Function], getClientServiceProxyByUrlAndType); 44 return o.forward(arguments); 45 } 46 47 /** 48 * This method is by default not supported. 49 * 50 * @throws UnsupportedOperationException 51 * @see ClientServiceProxyFactory#getClientServiceProxyByUrlAndType 52 */ 53 public function getClientServiceProxyByUrlAndType(url:String, type:Function) { 54 throw new UnsupportedOperationException("This operation is not supported by this client service proxy factory.", this, arguments); 55 } 56 57 }