synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Daniels" <gdani...@sonicsoftware.com>
Subject RE: Mediator interface
Date Tue, 27 Sep 2005 17:59:12 GMT

Two comments from me too:

1) Could you explain the lack of lifecycle methods a bit more?  I can
see how dependency injection will help with filling in various bits of
configuration, but don't you still want to be able to do your own thing
(even if not involving config) at startup/shutdown?

2) Why is name a QName and not a String?

--Glen 

> -----Original Message-----
> From: Paul Fremantle [mailto:pzfreo@gmail.com] 
> Sent: Sunday, September 25, 2005 4:21 PM
> To: synapse-dev@ws.apache.org
> Subject: Mediator interface
> 
> Guys 
> 
> Here is a first draft Mediator interface. Two comments.
> 
> 1) No init/cleanup because we expect those to be managed by IoC.
> 2) I *nearly* added a SynapseFault - which may have value. 
> But since the messages are fundamentally SOAP Infoset, then 
> the faults must sure be fundamentally SOAPy faults? 
> 
> Thoughts?
> 
> Paul
> 
> 
> 
> /*
>  * Copyright 2004,2005 The Apache Software Foundation.
>  *
>  * Licensed under the Apache License, Version 2.0 (the "License");
>  * you may not use this file except in compliance with the License.
>  * You may obtain a copy of the License at
>  *
>  *      http://www.apache.org/licenses/LICENSE-2.0
>  *
>  * Unless required by applicable law or agreed to in writing, software
>  * distributed under the License is distributed on an "AS IS" BASIS,
>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
> express or implied.
>  * See the License for the specific language governing permissions and
>  * limitations under the License.
>  */
> 
> package org.apache.synapse;
> 
> import org.apache.axis2.AxisFault;
> import org.apache.axis2.context.MessageContext;
> 
> import javax.xml.namespace.QName;
> 
> /**
>  * Interface Mediator
>  */
>  
> public interface Mediator {
>     
>     /**
>      * mediate is called by the framework when a message is 
> expected to be mediated
>      * Any faults must be processed and wrapped as a SynapseException
>      * 
>      * mediate returns true if the message is still to be processed
>      * mediate returns false if there is no more processing to be done
>      *
>      * @param msgContext the <code>MessageContext</code> to 
> process with this
>      *                   <code>Mediator</code>.
>      * @throws SynapseFault if the mediator encounters an error
>      */
>     public boolean mediate(MessageContext msgContext) throws 
> AxisFault;
>     public QName getName();
> 
> }
> 
> 
> 

Mime
View raw message