
org.ow2.petals.jsr181.PetalsMessageSender Maven / Gradle / Ivy
/**
* Copyright (c) 2008-2012 EBM WebSourcing, 2012-2016 Linagora
*
* This program/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 program/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 program/library; If not, see http://www.gnu.org/licenses/
* for the GNU Lesser General Public License version 2.1.
*/
package org.ow2.petals.jsr181;
import java.util.logging.Logger;
import javax.jbi.messaging.MessagingException;
import javax.xml.namespace.QName;
import org.ow2.easywsdl.wsdl.api.abstractItf.AbsItfOperation.MEPPatternConstants;
import org.ow2.petals.component.framework.api.configuration.SuConfigurationParameters;
import org.ow2.petals.component.framework.api.exception.PEtALSCDKException;
import org.ow2.petals.component.framework.api.message.Exchange;
/**
* @author Christophe HAMERLING - EBM WebSourcing
*/
public interface PetalsMessageSender {
/**
* Creates an exchange.
*
* @param mep the invocation MEP (not null)
* @return the created exchange
* @throws MessagingException
* @throws PEtALSCDKException
* @since 1.1.0
*/
public Exchange createExchange(MEPPatternConstants mep) throws MessagingException, PEtALSCDKException;
/**
* Creates an exchange.
*
* @param interfaceName the target interface name (use null as wild card)
* @param serviceName the target service name (use null as wild card)
* @param endpointName the target end-point name (use null as wild card)
* @param operationName the target operation name (can be null but not recommended)
* @param mep the invocation MEP (not null)
* @return the created exchange
* @throws MessagingException
* @throws PEtALSCDKException
* @since 1.3.0
*/
public Exchange createExchange(QName interfaceName, QName serviceName, String endpointName, QName operationName,
MEPPatternConstants mep) throws MessagingException, PEtALSCDKException;
/**
* Sends an exchange in the bus (synchronous sending).
* @param exchange
* @return
* @throws MessagingException
* @since 1.1.0
*/
public boolean sendSync(Exchange exchange) throws MessagingException;
/**
* Sends an exchange in the bus.
* @param exchange
* @throws MessagingException
* @since 1.1.0
*/
public void send(Exchange exchange) throws MessagingException;
/**
* @return the configuration extensions
*/
public SuConfigurationParameters getExtensions();
/**
* Returns a logger to be used in the service unit (SU) classes.
*
* The created logger is a child of the JSR-181 components's logger.
*
* About the new logger's name, the following convention is taken.
*
*
* Petals.Container.Components.petals-se-jsr181.interfaceName.serviceName.edptName
*
*
* ... where:
*
* - interfaceName is the local part of the SU's interface name.
* - serviceName is the local part of the SU's service name.
* - edptName is the SU's end-point name.
*
*
* This allows to set precisely the log levels in the loggers configuration.
*
*
* Notice that these logger names can be ugly in case of generated end-point names.
*
*
* @return a logger (not null)
* @since 1.3.0
*/
public Logger getComponentChildLogger();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy