Spring Framework RemoteExporter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework RemoteExporter class.

This code example shows how to use the following methods:getService, getServiceInterface, checkService, checkServiceInterface
    private HproseMode mode = HproseMode.MemberMode;
    private HproseFilter filter = null;
 
    @Override 
    public void afterPropertiesSet() throws Exception {
        checkService(); 
        checkServiceInterface(); 
        Object service = getService();
        Class cls = getServiceInterface();
        tcpServer = new HproseTcpServer(host, port);
        tcpServer.add(service, cls);
        tcpServer.setDebugEnabled(debug);
        tcpServer.setEvent(event);
        tcpServer.setMode(mode);
        tcpServer.setFilter(filter);
    } 
 
    public void setDebugEnabled(boolean value) {
        debug = value;
    } 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getService, getServiceInterface, checkService, checkServiceInterface
    private HproseMode mode = HproseMode.MemberMode; 
    private HproseFilter filter = null; 
 
    @Override 
    public void afterPropertiesSet() throws Exception { 
        checkService(); 
        checkServiceInterface(); 
        Object service = getService(); 
        Class cls = getServiceInterface(); 
        httpService = new HproseHttpService(); 
        httpService.add(service, cls); 
        httpService.setCrossDomainEnabled(crossDomain); 
        httpService.setGetEnabled(get); 
        httpService.setP3pEnabled(p3p); 
        httpService.setDebugEnabled(debug); 
        httpService.setEvent(event); 
        httpService.setMode(mode); 
        httpService.setFilter(filter); 
    } 
 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:checkService, checkServiceInterface, getProxyForService
     */ 
    @Override 
    public void afterPropertiesSet() throws Exception {
        if (this.webServer == null)
            throw new IllegalArgumentException("webServer is required");
        checkService(); 
        checkServiceInterface(); 
        this.proxy = getProxyForService();
      
        if (serviceName == null || "".equals(serviceName)) {
            this.webServer.addHandler("$default", this);
        } else { 
            this.webServer.addHandler(serviceName, this);
        } 
         
    } 
 
    /** 
     * <p>destroy</p> 
     * 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getService, getServiceInterface
import org.springframework.remoting.support.RemoteExporter;
 
public class AbstractAvroExporter extends RemoteExporter {
 
    protected Responder getResponder() { 
        return new SpecificResponder(getServiceInterface(), getService());
    } 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getProxyForService
		this.ignoreInvalidRequests = ignoreInvalidRequests;
	} 
 
	@Override 
	public void afterPropertiesSet() { 
		this.proxy = getProxyForService();
	} 
 
 
	@Override 
	public void onMessage(Message requestMessage, Session session) throws JMSException {
		RemoteInvocation invocation = readRemoteInvocation(requestMessage);
		if (invocation != null) {
			RemoteInvocationResult result = invokeAndCreateResult(invocation, this.proxy);
			writeRemoteInvocationResult(requestMessage, session, result);
		} 
	} 
 
	/** 
	 * Read a RemoteInvocation from the given JMS message. 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getServiceInterface, setServiceInterface
     */ 
    protected TProcessor processor;
 
    @Override 
    public void setServiceInterface(Class serviceInterface) {
        super.setServiceInterface(ThriftUtil.buildServiceInterface(serviceInterface));
        this.thriftClass = getServiceInterface().getEnclosingClass();
        Assert.notNull(this.thriftClass, "the 'thriftClass' can't be null");
    } 
 
    @Override 
    public void afterPropertiesSet() throws Exception {
        Class serviceInterface = getServiceInterface();
        Object service = getService();
 
        Assert.notNull(service, "the service must not be null");
        Assert.notNull(serviceInterface, "the serviceInterface must not be null");
        Assert.isTrue(serviceInterface.isAssignableFrom(service.getClass()));
 
        this.processor = ThriftUtil.buildProcessor(thriftClass, getServiceInterface(), getService());
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
import static org.apache.camel.util.ObjectHelper.notNull; 
 
/** 
 * A {@link FactoryBean} to create a proxy to a service exposing a given {@link #getServiceInterface()} 
 */ 
public class CamelServiceExporter extends RemoteExporter implements InitializingBean, DisposableBean, ApplicationContextAware, CamelContextAware {
    private String uri;
    private CamelContext camelContext;
    private String camelContextId;
    private Consumer consumer;
    private String serviceRef;
    private ApplicationContext applicationContext;
 
    public String getUri() {
        return uri;
    } 
 
    public void setUri(String uri) {
        this.uri = uri;
    } 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getService, getServiceInterface
    } 
 
    @Override 
    public void afterPropertiesSet() throws Exception {
 
        Class<?> serviceInterface = getServiceInterface();
 
        Object service = getService();
 
        registrar.setSerializeJavaBeanProperties(this.serializeJavaBeanProperties);
        if (exportServiceParameters) {
            registrar.discoverClasses(service.getClass());
        } 
        registrar.registerClasses(this.classes);
        registrar.afterPropertiesSet();
 
 
        Assert.notNull(service, "the service target can NOT be null!");
 
        if (eventLoop == null) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
import org.apache.avro.ipc.Server; 
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.SmartLifecycle;
import org.springframework.remoting.avro.servers.NettyServerCreationCallback; 
import org.springframework.remoting.avro.servers.ServerCreationCallback; 
import org.springframework.remoting.support.RemoteExporter;
import org.springframework.util.Assert;
 
import java.net.InetSocketAddress;
 
/** 
 * {@link RemoteExporter} for Avro's {@link org.apache.avro.Protocol protocols}. 
 * This {@link RemoteExporter} builds an instance of Avro's {@link Server}, and then starts it up 
 * and configures it to expose your service bean. If you would rather let a web container 
 * handle the server duties, then use the {@link AvroServiceExporter}, which can be used in any 
 * {@link org.springframework.web.context.WebApplicationContext} 
 * 
 * @author Josh Long 
 * @see AvroServiceExporter 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getProxyForService
    { 
        private Object proxy;
 
        public void afterPropertiesSet() 
        { 
            this.proxy = getProxyForService();
        } 
 
        public Object execute(RemoteInvocation invocation)
        { 
            try 
            { 
                Object value = invoke(invocation, proxy);
                return value;
            } 
            catch (Throwable ex)
            { 
                return new RemoteInvocationResult(ex);
            } 
        } 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Spring Framework RemoteExporter Methods: