Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Swordfish Documentation: Architecture: Interceptor Framework"

(New page: == Option 1 (proposed by Jürgen) == Image:Interceptor_Framework_Option1.png Example of interceptor registration: <pre> <bean id="exampleInterceptor" class="org.eclipse.swordfish.plugi...)
 
(Option 2 (proposed by Zsolt))
Line 16: Line 16:
  
 
== Option 2 (proposed by Zsolt) ==
 
== Option 2 (proposed by Zsolt) ==
[[Image:Interceptor_Framework_Option1.png]]
+
[[Image:Interceptor_Framework_Option2.png]]
Example of interceptor registration:
+
<h1>Example of interceptor registration:</h1>
 
<pre>
 
<pre>
 
<bean id="exampleConsReqInterceptor" class="org.eclipse.swordfish.plugins.samples.ExampleConsReqInterceptor"/>
 
<bean id="exampleConsReqInterceptor" class="org.eclipse.swordfish.plugins.samples.ExampleConsReqInterceptor"/>

Revision as of 10:30, 12 November 2009

Option 1 (proposed by Jürgen)

Interceptor Framework Option1.png Example of interceptor registration:

<bean id="exampleInterceptor" class="org.eclipse.swordfish.plugins.samples.ExampleInterceptor"/>

<osgi:service ref="exampleInterceptor">
		<osgi:interfaces>
			<value>org.eclipse.swordfish.core.ConsReqInterceptor</value>
			<value>org.eclipse.swordfish.core.ConsResInterceptor</value>
			<value>org.eclipse.swordfish.core.ProvReqInterceptor</value>
			<value>org.eclipse.swordfish.core.ProvresInterceptor</value>
		</osgi:interfaces>
	</osgi:service>

Option 2 (proposed by Zsolt)

Interceptor Framework Option2.png

Example of interceptor registration:

<bean id="exampleConsReqInterceptor" class="org.eclipse.swordfish.plugins.samples.ExampleConsReqInterceptor"/>
<bean id="exampleConsResInterceptor" class="org.eclipse.swordfish.plugins.samples.ExampleConsResInterceptor"/>
<bean id="exampleProvReqInterceptor" class="org.eclipse.swordfish.plugins.samples.ExampleProvReqInterceptor"/>
<bean id="exampleProvResInterceptor" class="org.eclipse.swordfish.plugins.samples.ExampleProvResInterceptor"/>

<osgi:service ref="exampleConsReqInterceptor" interface=“org.eclipse.swordfish.core.Interceptor“>
		<osgi:service-properties>
			<entry key=“role“ value=“consumer“/>
			<entry key=“scope“ value=“request“/>
		</osgi:service-properties>
</osgi:service>
<osgi:service ref="exampleConsResInterceptor" interface=“org.eclipse.swordfish.core.Interceptor“>
		<osgi:service-properties>
			<entry key=“role“ value=“consumer“/>
			<entry key=“scope“ value=“response“/>
		</osgi:service-properties>
</osgi:service>
<osgi:service ref="exampleProviderReqInterceptor" interface=“org.eclipse.swordfish.core.Interceptor“>
		<osgi:service-properties>
			<entry key=“role“ value=“provider“/>
			<entry key=“scope“ value=“request“/>
		</osgi:service-properties>
</osgi:service>
<osgi:service ref="exampleProvResInterceptor" interface=“org.eclipse.swordfish.core.Interceptor“>
		<osgi:service-properties>
			<entry key=“role“ value=“provider“/>
			<entry key=“scope“ value=“response“/>
		</osgi:service-properties>
</osgi:service>

Back to the top