/** * Determine the object to export: either the service object itself * or a RmiInvocationWrapper in case of a non-RMI service object. * @return the RMI object to export * @see #setService * @see #setServiceInterface */ protected Remote getObjectToExport() { // determine remote object if (getService() instanceof Remote && (getServiceInterface() == null || Remote.class.isAssignableFrom(getServiceInterface()))) { // conventional RMI service return (Remote) getService(); } else { // RMI invoker if (logger.isDebugEnabled()) { logger.debug("RMI service [" + getService() + "] is an RMI invoker"); } return new RmiInvocationWrapper(getProxyForService(), this); } }
/** * Delegates the actual invocation handling to the RMI exporter. * @see RmiBasedExporter#invoke(org.springframework.remoting.support.RemoteInvocation, Object) */ @Override @Nullable public Object invoke(RemoteInvocation invocation) throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { return this.rmiExporter.invoke(invocation, this.wrappedObject); }
/** * Exposes the exporter's service interface, if any, as target interface. * @see RmiBasedExporter#getServiceInterface() */ @Override @Nullable public String getTargetInterfaceName() { Class<?> ifc = this.rmiExporter.getServiceInterface(); return (ifc != null ? ifc.getName() : null); }
/** * Exposes the exporter's service interface, if any, as target interface. * @see RmiBasedExporter#getServiceInterface() */ @Override @Nullable public String getTargetInterfaceName() { Class<?> ifc = this.rmiExporter.getServiceInterface(); return (ifc != null ? ifc.getName() : null); }
/** * Determine the object to export: either the service object itself * or a RmiInvocationWrapper in case of a non-RMI service object. * @return the RMI object to export * @see #setService * @see #setServiceInterface */ protected Remote getObjectToExport() { // determine remote object if (getService() instanceof Remote && (getServiceInterface() == null || Remote.class.isAssignableFrom(getServiceInterface()))) { // conventional RMI service return (Remote) getService(); } else { // RMI invoker if (logger.isDebugEnabled()) { logger.debug("RMI service [" + getService() + "] is an RMI invoker"); } return new RmiInvocationWrapper(getProxyForService(), this); } }
/** * Exposes the exporter's service interface, if any, as target interface. * @see RmiBasedExporter#getServiceInterface() */ @Override @Nullable public String getTargetInterfaceName() { Class<?> ifc = this.rmiExporter.getServiceInterface(); return (ifc != null ? ifc.getName() : null); }
/** * Delegates the actual invocation handling to the RMI exporter. * @see RmiBasedExporter#invoke(org.springframework.remoting.support.RemoteInvocation, Object) */ @Override @Nullable public Object invoke(RemoteInvocation invocation) throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { return this.rmiExporter.invoke(invocation, this.wrappedObject); }
/** * Determine the object to export: either the service object itself * or a RmiInvocationWrapper in case of a non-RMI service object. * @return the RMI object to export * @see #setService * @see #setServiceInterface */ protected Remote getObjectToExport() { // determine remote object if (getService() instanceof Remote && (getServiceInterface() == null || Remote.class.isAssignableFrom(getServiceInterface()))) { // conventional RMI service return (Remote) getService(); } else { // RMI invoker if (logger.isDebugEnabled()) { logger.debug("RMI service [" + getService() + "] is an RMI invoker"); } return new RmiInvocationWrapper(getProxyForService(), this); } }
/** * Delegates the actual invocation handling to the RMI exporter. * @see RmiBasedExporter#invoke(org.springframework.remoting.support.RemoteInvocation, Object) */ @Override @Nullable public Object invoke(RemoteInvocation invocation) throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { return this.rmiExporter.invoke(invocation, this.wrappedObject); }