Spring Framework RemoteAccessor - 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 RemoteAccessor class.

This code example shows how to use the following methods:getServiceInterface, getServiceUrl
    public void destroy() throws Exception {
        ServiceHelper.stopService(producer);
    } 
 
    public Class<?> getServiceInterface() {
        return super.getServiceInterface(); 
    } 
 
    public String getServiceUrl() {
        return super.getServiceUrl(); 
    } 
 
    public Object getObject() throws Exception {
        return serviceProxy;
    } 
 
    public Class<?> getObjectType() {
        return getServiceInterface(); 
    } 
 
6
CodeRank
This code example shows how to use the following methods:
 * @since 1.2 
 * @see AmqpInvokerServiceExporter 
 * @see AmqpProxyFactoryBean 
 * @see org.springframework.remoting.RemoteAccessException 
 */ 
public class AmqpClientInterceptor extends RemoteAccessor implements MethodInterceptor { 
 
	private AmqpTemplate amqpTemplate; 
 
	private String routingKey = null; 
 
	private RemoteInvocationFactory remoteInvocationFactory = new DefaultRemoteInvocationFactory(); 
 
	@Override 
	public Object invoke(MethodInvocation invocation) throws Throwable { 
		RemoteInvocation remoteInvocation = getRemoteInvocationFactory().createRemoteInvocation(invocation); 
 
		Object rawResult; 
		if (getRoutingKey() == null) { 
			// Use the template's default routing key 
5
CodeRank
This code example shows how to use the following methods:
 * in turn talk to remote Avro RPC implementations 
 * 
 * @author Josh Long 
 * @see org.springframework.remoting.avro.clients.TransceiverCreationCallback 
 */ 
public class AvroProxyFactoryBean<T> extends RemoteAccessor implements InitializingBean, MethodInterceptor, FactoryBean<T> { 
 
    private TransceiverCreationCallback transceiverCreationCallback; 
 
    private int port = 2003; 
 
    private Transceiver transceiver; 
    private Object serviceProxy; 
    private InetSocketAddress address; 
 
    private Object client; 
 
    public void setPort(int port) { 
        this.port = port; 
    } 
4
CodeRank
This code example shows how to use the following methods:getServiceInterface
        return serviceProxy; 
    } 
 
    @Override 
    public Class<?> getObjectType() { 
        return getServiceInterface(); 
    } 
 
    @Override 
    public boolean isSingleton() { 
        return true; 
    } 
 
    @Override 
    public Object invoke(MethodInvocation invocation) throws Throwable { 
        // now, unless i miss my mark, the interface of this proxy and the proxy we've created locally are the same, 
        // so it should be a simple matter to forward the MethodInvocation on to the local client 
        Method method = invocation.getMethod(); 
 
        if (method.getName().equals("toString")) { 
4
CodeRank
This code example shows how to use the following methods:getServiceInterface
    public T getObject() { 
        return (T) this.serviceProxy; 
    } 
 
    public Class<?> getObjectType() { 
        return getServiceInterface(); 
    } 
 
    public boolean isSingleton() { 
        return true; 
    } 
 
    @Override 
    public Object invoke(MethodInvocation invocation) throws Throwable { 
        // now, unless i miss my mark, the interface of this proxy and the proxy weve created locally are the same, 
        // so it should be a simple matter to forward the MethodInvocation on to the local client 
        Method method = invocation.getMethod(); 
 
        if (logger.isDebugEnabled()) { 
            logger.debug("invoking " + invocation.toString() + " on the client proxy"); 
4
CodeRank
This code example shows how to use the following methods:getServiceInterface
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public Class<?> getObjectType() { 
		return getServiceInterface(); 
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public boolean isSingleton() { 
		return true; 
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public void setApplicationContext(ApplicationContext applicationContext) { 
		this.applicationContext = applicationContext; 
3
CodeRank
This code example shows how to use the following methods:getServiceInterface
    @SuppressWarnings("unchecked") 
    public Object getObject() throws Exception {
        if (exception != null) {
            throw exception;
        } 
        return client.useService(getServiceInterface());
    } 
 
    @Override 
    public Class getObjectType() {
        return getServiceInterface();
    } 
 
    @Override 
    public boolean isSingleton() { 
        return true; 
    } 
} 
3
CodeRank
See Code Examples for Spring Framework RemoteAccessor Methods: