Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Swordfish Documentation: Architecture: Internal Service Proxy"
Line 6: | Line 6: | ||
<h1>Plugin description</h1> | <h1>Plugin description</h1> | ||
<br/> | <br/> | ||
+ | |||
+ | <pre> | ||
+ | <osgi:reference id="internalProxy" | ||
+ | interface="org.eclipse.swordfish.core.proxy.InternalProxy" /> | ||
+ | |||
+ | <bean id="ASFRegistryProvider" | ||
+ | class="org.eclipse.swordfish.internal.resolver.backend.remote.ASFRegistryProvider" | ||
+ | p:proxy-ref="internalProxy"/> | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | public class ASFRegistryProvider extends AbstractDocumentProvider { | ||
+ | |||
+ | private InternalProxy proxy; | ||
+ | |||
+ | @Override | ||
+ | public Collection<ServiceDescription<?>> getServiceProviderDescriptions(QName interfaceName) { | ||
+ | String res = null; | ||
+ | try { | ||
+ | res = proxy.invokeRequestResponseOperation( | ||
+ | QName.valueOf("{http://services.sopware.org/registry/ServiceRegistryProvider/1.0}ServiceRegistryProvider"), | ||
+ | QName.valueOf("{http://services.sopware.org/registry/ServiceRegistryProvider/1.0}xlookUp_serviceProvider"), | ||
+ | inMessage); | ||
+ | } catch (Exception e) { | ||
+ | e.printStackTrace(); | ||
+ | } | ||
+ | return res; | ||
+ | } | ||
+ | |||
+ | public void setProxy(InternalProxy proxy) { | ||
+ | this.proxy = proxy; | ||
+ | } | ||
+ | |||
+ | } | ||
+ | </pre> |
Revision as of 05:21, 26 October 2009
Component diagrams
Sketch of сomponent сlasses for Internal Service Proxy Plugin
Plugin description
<osgi:reference id="internalProxy" interface="org.eclipse.swordfish.core.proxy.InternalProxy" /> <bean id="ASFRegistryProvider" class="org.eclipse.swordfish.internal.resolver.backend.remote.ASFRegistryProvider" p:proxy-ref="internalProxy"/>
public class ASFRegistryProvider extends AbstractDocumentProvider { private InternalProxy proxy; @Override public Collection<ServiceDescription<?>> getServiceProviderDescriptions(QName interfaceName) { String res = null; try { res = proxy.invokeRequestResponseOperation( QName.valueOf("{http://services.sopware.org/registry/ServiceRegistryProvider/1.0}ServiceRegistryProvider"), QName.valueOf("{http://services.sopware.org/registry/ServiceRegistryProvider/1.0}xlookUp_serviceProvider"), inMessage); } catch (Exception e) { e.printStackTrace(); } return res; } public void setProxy(InternalProxy proxy) { this.proxy = proxy; } }