Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
PETALS - PETALS Services Platform. Copyright (c) 2008 EBM Websourcing, http://www.ebmwebsourcing.com/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------- $Id$ -------------------------------------------------------------------------
 
 
 package org.ow2.petals.component.framework.api.message;
 
 import java.net.URI;
 import java.util.Map;
 import java.util.Set;
 
 
The MessageExchange wrapper to handle properly MessageExchange against the CDK.

Author(s):
rnaudin - EBM WebSourcing
Since:
1.0
 
 public interface Exchange {
 
     static final String IN_MESSAGE_NAME = "in";
 
     static final String OUT_MESSAGE_NAME = "out";
 
     static final QName DEFAULT_FAULT_QNAME = new QName("http://petals.ow2.org/cdk/defaultFault",
             "0");
     
     static final String PROPERTY_PROVIDER_LINKTYPE = "org.ow2.petals.messaging.provider.linktype";

    
Put a Source object in the out message of the message exchange. If the out normalized message is null, it is created here. The charset encoding used to create the Source content of the message is automatically extracted from the given xml message String. If no encoding specified in the given xml String UTF-8 is used by default.

Deprecated:
use the method $
Parameters:
outContent the String content to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
 
     void setOutMessageContent(final String outContentthrows MessagingException;

    
Put a Source object in the out message of the message exchange. If the out normalized message is null, it is created here.

Parameters:
outContent the DOM document content to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
 
     void setOutMessageContent(final Document outContentthrows MessagingException;

    
Put a Source object in the out message of the message exchange. If the out normalized message is null, it is created here.

Parameters:
outContent the Source content to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
 
     void setOutMessageContent(final Source outContentthrows MessagingException;

    
Put a Source object in the out message of the message exchange. If the out normalized message is null, it is created here. The charset encoding used to create the Source content of the message is automatically extracted from the given xml message String. If no encoding specified in the given xml String UTF-8 is used by default. Add given security subject.

Deprecated:
use the method $
Parameters:
outContent the String content to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
    void setOutMessageContent(final String outContentSubject securitySubject)
            throws MessagingException;

    
Put a Source object in the out message of the message exchange. If the out normalized message is null, it is created here. Add given security subject.

Parameters:
outContent the DOM document content to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
    void setOutMessageContent(final Document outContentSubject securitySubject)
            throws MessagingException;

    
Put a Source object in the out message of the message exchange. If the out normalized message is null, it is created here. Add given security subject.

Parameters:
outContent the Source content to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
    void setOutMessageContent(final Source outContentSubject securitySubject)
            throws MessagingException;

    
Put a Source object in the in message of the message exchange. If the in normalized message is null, it is created here. The charset encoding used to create the Source content of the message is automatically extracted from the given xml message String. If no encoding specified in the given xml String UTF-8 is used by default.

Deprecated:
use the method $
Parameters:
inContent the String content to put in the in message
Throws:
javax.jbi.messaging.MessagingException if error occured during in message creation
    void setInMessageContent(final String inContentthrows MessagingException;

    
Put a Source object in the in message of the message exchange. If the in normalized message is null, it is created here.

Parameters:
inContent the DOM Document content to put in the in message
Throws:
javax.jbi.messaging.MessagingException if error occured during in message creation
    void setInMessageContent(final Document inContentthrows MessagingException;

    
Put a Source object in the in message of the message exchange. If the in normalized message is null, it is created here.

Parameters:
inContent the Source content to put in the in message
Throws:
javax.jbi.messaging.MessagingException if error occured during in message creation
    void setInMessageContent(final Source inContentthrows MessagingException;

    
Get the content of the "in" message as a String

Deprecated:
use the method $
Returns:
the String represention of the "in" message content
Throws:
javax.jbi.messaging.MessagingException if error occured during String creation from Source or if "in" message is null
Get the content of the "in" message as a DOM document

Returns:
the DOM document represention of the "in" message content
Throws:
javax.jbi.messaging.MessagingException if error occured during String creation from Source or if "in" message is null
Get the content of the "in" message as a Source

Returns:
the "in" message content
Throws:
javax.jbi.messaging.MessagingException if "in" message is null
Get the content of the "out" message as a String

Deprecated:
use the method $
Returns:
the String represention of the "out" message content
Throws:
javax.jbi.messaging.MessagingException if error occured during String creation from Source or if "out" message is null
Get the content of the "out" message as a String

Returns:
the String represention of the "out" message content
Throws:
javax.jbi.messaging.MessagingException if error occured during String creation from Source or if "out" message is null
Get the content of the "out" message as a Source

Returns:
the "out" message content
Throws:
javax.jbi.messaging.MessagingException if "out" message is null
Get all the input attachments in a java.util.Set

Parameters:
exchange
Returns:
Get the message exchange Pattern

Returns:
the URI pattern. Can't be null
Throws:
javax.jbi.messaging.MessagingException if no message exchange pattern is set
    URI getExchangePattern() throws MessagingException;

    
Get the operation name (local part of the operation QName)

Returns:
the operation name
Throws:
javax.jbi.messaging.MessagingException if no Operation QName is set
    String getOperationName() throws MessagingException;

    
Get the endpoint name specified in the message exchange

Returns:
the endpoint name
Throws:
javax.jbi.messaging.MessagingException if no Endpoint is set
    String getEndpointName() throws MessagingException;

    
Extract incoming NormalizedMessage from given MessageExchange. Create the message if it is null.

Returns:
the incoming NormalizedMessage
Set the input message

    void setInMessage(final NormalizedMessage msgthrows MessagingException;

    
Extract outgoing NormalizedMessage from given MessageExchange. Create the output message if message is null.

Returns:
the outgoing NormalizedMessage
Set the output message

    void setOutMessage(final NormalizedMessage msgthrows MessagingException;

    
    void setFault(Exception ethrows MessagingException;

    
Put a Map of attachements in the out message of the message exchange. If the out normalized message is null, it is created here.

Parameters:
attachements the attachements to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
    void setOutMessageAttachments(Map<StringDataHandlerattachementsthrows MessagingException;

    
Put a Map of attachements in the out message of the message exchange. If the out normalized message is null, it is created here.

Parameters:
attachements the attachements to put in the out message
Throws:
javax.jbi.messaging.MessagingException if error occured during out message creation
    void setInMessageAttachments(Map<StringDataHandlerattachementsthrows MessagingException;

    
Set the message exchange status to DONE

    void setDoneStatus() throws MessagingException;

    
Test if the message status is DONE

Returns:
    boolean isDoneStatus();

    
Set the message exchange status to Error

    void setErrorStatus() throws MessagingException;

    
Test if the message status is ERROR

Returns:
    boolean isErrorStatus();

    
Set the message exchange status to ACTIVE

    void setActiveStatus() throws MessagingException;

    
Test if the message status is ACTIVE

Returns:
    boolean isActiveStatus();

    

Returns:
true is the message role is provider
    boolean isProviderRole();

    

Returns:
true is the message role is consumer
    boolean isConsumerRole();

    

Returns:
    boolean isInOnlyPattern();

    

Returns:
    boolean isRobustInOnlyPattern();

    

Returns:
    boolean isInOutPattern();

    
True if an out message is set on the MessageExchange false otherwise
    boolean isOutMessage();

    

Returns:
    boolean isInOptionalOutPattern();

    
    Fault createFault() throws MessagingException;

    

Returns:
    ServiceEndpoint getEndpoint();

    

Returns:
    Exception getError();

    

Returns:
    String getExchangeId();

    

Returns:
    Fault getFault();

    

Returns:
    QName getInterfaceName();

    

Returns:
    QName getOperation();

    

Returns:
    URI getPattern();

    

Parameters:
name
Returns:
    Object getProperty(String name);

    

Returns:
    Set<?> getPropertyNames();

    

Returns:
    MessageExchange.Role getRole();

    

Returns:
    QName getService();

    

Returns:
    ExchangeStatus getStatus();

    

Returns:
    boolean isTransacted();

    

Parameters:
endpoint
    void setEndpoint(ServiceEndpoint endpoint);

    

Parameters:
error
    void setError(Exception error);

    
    void setFault(Fault faultthrows MessagingException;

    

Parameters:
interfaceName
    void setInterfaceName(QName interfaceName);

    

Parameters:
name
    void setOperation(QName name);

    

Parameters:
name
obj
    void setProperty(String nameObject obj);

    

Parameters:
service
    void setService(QName service);

    

Parameters:
status
Throws:
javax.jbi.messaging.MessagingException
    void setStatus(ExchangeStatus statusthrows MessagingException;

    

Parameters:
name
value
Throws:
javax.jbi.messaging.MessagingException
    void setOutMessageProperty(String nameObject valuethrows MessagingException;

    

Parameters:
properties
Throws:
javax.jbi.messaging.MessagingException
    void setOutMessageProperties(Map<StringObjectpropertiesthrows MessagingException;

    

Parameters:
name
Returns:
Throws:
javax.jbi.messaging.MessagingException
    Object getOutMessageProperty(String namethrows MessagingException;

    
    Set<?> getOutMessagePropertyNames() throws MessagingException;

    

Parameters:
name
value
Throws:
javax.jbi.messaging.MessagingException
    void setInMessageProperty(String nameObject valuethrows MessagingException;

    

Parameters:
properties
Throws:
javax.jbi.messaging.MessagingException
    void setInMessageProperties(Map<StringObjectpropertiesthrows MessagingException;

    

Parameters:
name
Returns:
Throws:
javax.jbi.messaging.MessagingException
    Object getInMessageProperty(String namethrows MessagingException;

    
    Set<?> getInMessagePropertyNames() throws MessagingException;

    

Parameters:
name
dataHandler
Throws:
javax.jbi.messaging.MessagingException
    void addInMessageAttachment(String nameDataHandler dataHandlerthrows MessagingException;

    

Parameters:
name
dataHandler
Throws:
javax.jbi.messaging.MessagingException
    void addOutMessageAttachment(String nameDataHandler dataHandlerthrows MessagingException;
New to GrepCode? Check out our FAQ X