1 16 17 package org.springframework.remoting.rmi; 18 19 import java.lang.reflect.InvocationTargetException ; 20 import java.rmi.Remote ; 21 22 import org.springframework.remoting.support.RemoteInvocation; 23 import org.springframework.remoting.support.RemoteInvocationBasedExporter; 24 25 40 public abstract class RmiBasedExporter extends RemoteInvocationBasedExporter { 41 42 49 protected Remote getObjectToExport() { 50 if (getService() instanceof Remote && 52 ((getServiceInterface() == null) || Remote .class.isAssignableFrom(getServiceInterface()))) { 53 return (Remote ) getService(); 55 } 56 else { 57 if (logger.isDebugEnabled()) { 59 logger.debug("RMI service [" + getService() + "] is an RMI invoker"); 60 } 61 return new RmiInvocationWrapper(getProxyForService(), this); 62 } 63 } 64 65 69 protected Object invoke(RemoteInvocation invocation, Object targetObject) 70 throws NoSuchMethodException , IllegalAccessException , InvocationTargetException { 71 72 return super.invoke(invocation, targetObject); 73 } 74 75 } 76 | Popular Tags |