1 15 package org.apache.tapestry.services.impl; 16 17 import java.io.IOException ; 18 19 import org.apache.hivemind.util.Defense; 20 import org.apache.tapestry.IRequestCycle; 21 import org.apache.tapestry.engine.IEngineService; 22 import org.apache.tapestry.engine.ILink; 23 24 35 public class EngineServiceOuterProxy implements IEngineService 36 { 37 private final String _serviceName; 38 39 private IEngineService _delegate; 40 41 public EngineServiceOuterProxy(String serviceName) 42 { 43 Defense.notNull(serviceName, "serviceName"); 44 45 _serviceName = serviceName; 46 } 47 48 void installDelegate(IEngineService delegate) 49 { 50 _delegate = delegate; 51 } 52 53 IEngineService getDelegate() 54 { 55 return _delegate; 56 } 57 58 public ILink getLink(IRequestCycle cycle, Object parameter) 59 { 60 return _delegate.getLink(cycle, parameter); 61 } 62 63 public void service(IRequestCycle cycle) throws IOException 64 { 65 _delegate.service(cycle); 66 } 67 68 public String getName() 69 { 70 return _serviceName; 71 } 72 73 public String toString() 74 { 75 return ImplMessages.engineServiceOuterProxyToString(_serviceName); 76 } 77 78 } | Popular Tags |