org.gcube.common.clients.delegates
Interface ProxyPlugin<A,S,P>


public interface ProxyPlugin<A,S,P>

Provides information to customise the strategy of a ProxyDelegate.

Author:
Fabio Simeoni
See Also:
Call, ProxyDelegate

Method Summary
 Exception convert(Exception fault, ProxyConfig<?,?> config)
          Converts a fault raised by a Call into a fault that can be recognised by ProxyDelegate clients.
 String name()
          Returns the name of the service.
 String namespace()
          Returns the namespace of the service
 P newProxy(ProxyDelegate<S> delegate)
          Returns a proxy with a given delegate
 S resolve(A address, ProxyConfig<?,?> config)
          Returns a stub for a given service endpoint
 String serviceClass()
          Returns the gCube name of the service.
 String serviceName()
          Returns the gCube class of the service.
 

Method Detail

name

String name()
Returns the name of the service.

Returns:
the name

namespace

String namespace()
Returns the namespace of the service

Returns:
the namespace

serviceClass

String serviceClass()
Returns the gCube name of the service.

Returns:
the name

serviceName

String serviceName()
Returns the gCube class of the service.

Returns:
the class

convert

Exception convert(Exception fault,
                  ProxyConfig<?,?> config)
Converts a fault raised by a Call into a fault that can be recognised by ProxyDelegate clients.

Parameters:
fault - the original fault
Returns:
the converted fault

resolve

S resolve(A address,
          ProxyConfig<?,?> config)
          throws Exception
Returns a stub for a given service endpoint

Parameters:
address - the address of the endpoint
Returns:
the stub
Throws:
Exception - if the address cannot be resolved

newProxy

P newProxy(ProxyDelegate<S> delegate)
Returns a proxy with a given delegate

Parameters:
delegate - the delegate
Returns:
the proxy


Copyright © 2013. All Rights Reserved.