org.ow2.petals.ws.notification.NotificationMessage Maven / Gradle / Ivy
The newest version!
/**
* PETALS - PETALS Services Platform.
* Copyright (c) 2007 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.ws.notification;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.xml.namespace.QName;
import org.apache.axiom.om.OMElement;
import org.ow2.petals.ws.addressing.EndpointReference;
import org.ow2.petals.ws.topic.WstConstants;
/**
* A notification message
*
* @author chamerling - eBM WebSourcing
*
*/
public class NotificationMessage {
/**
*
*/
protected QName topicPath;
/**
* The message producer EPR
*/
protected EndpointReference producerEPR;
/**
* The notification message subscriber EPR
*/
protected EndpointReference subscriptionEPR;
/**
* The notification message content
*/
protected Map messageContent;
/**
* Creates a new instance of {@link NotificationMessage}
*
*/
public NotificationMessage() {
messageContent = new LinkedHashMap();
}
/**
*
* @param element
*/
public void addMessageContent(OMElement element) {
if (element == null) {
throw new NullPointerException("Message contant can not be null");
}
QName key = element.getQName();
messageContent.put(key, element);
}
/**
* @return the messageContent
*/
public Map getMessageContent() {
return messageContent;
}
/**
* @param messageContent
* the messageContent to set
*/
public void setMessageContent(Map messageContent) {
this.messageContent = messageContent;
}
/**
* @return the producer
*/
public EndpointReference getProducerEPR() {
return producerEPR;
}
/**
* @param producer
* the producer to set
*/
public void setProducerEPR(EndpointReference producer) {
this.producerEPR = producer;
}
/**
* @return the subscription
*/
public EndpointReference getSubscriptionEPR() {
return subscriptionEPR;
}
/**
* @param subscription
* the subscription to set
*/
public void setSubscriptionEPR(EndpointReference subscription) {
this.subscriptionEPR = subscription;
}
/**
* @return the topic
*/
public QName getTopic() {
return topicPath;
}
/**
* Get the topic dialect
*
* @return
*/
public String getTopicDialect() {
return WstConstants.CONCRETE_TOPIC_URI;
}
/**
* @param topic
* the topic to set
*/
public void setTopic(QName topic) {
this.topicPath = topic;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy