You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-dev@ws.apache.org by ip...@apache.org on 2005/01/15 01:53:09 UTC
svn commit: r125239 - in incubator/hermes/trunk/src/java/org/apache/ws: notification/base notification/tool notification/tool/v1_2 notification/tool/v1_3 notification/topics/v1_2 pubsub
Author: ips
Date: Fri Jan 14 16:53:09 2005
New Revision: 125239
URL: http://svn.apache.org/viewcvs?view=rev&rev=125239
Log:
various
Added:
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/QueryExpressionFilter.java
incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java
incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/
incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_3/
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/AbstractTopicExpression.java
Removed:
incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Status.java
incubator/hermes/trunk/src/java/org/apache/ws/pubsub/TopicFilter.java
Modified:
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/Subscription.java
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/Topics1_2Constants.java
incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Filter.java
incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationConsumer.java
incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationProducer.java
incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Subscription.java
Added: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/QueryExpressionFilter.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/QueryExpressionFilter.java?view=auto&rev=125239
==============================================================================
--- (empty file)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/QueryExpressionFilter.java Fri Jan 14 16:53:09 2005
@@ -0,0 +1,29 @@
+/*=============================================================================*
+ * Copyright 2004 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.ws.notification.base;
+
+import org.apache.ws.resource.properties.query.QueryExpression;
+import org.apache.ws.pubsub.Filter;
+
+/**
+ * A WSRF query expression that acts as a notification filter. The
+ * precondition and selector fields of {@link Subscription} implement
+ * this interface.
+ */
+public interface QueryExpressionFilter extends QueryExpression, Filter
+{
+
+}
Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/Subscription.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/Subscription.java?view=diff&rev=125239&p1=incubator/hermes/trunk/src/java/org/apache/ws/notification/base/Subscription.java&r1=125238&p2=incubator/hermes/trunk/src/java/org/apache/ws/notification/base/Subscription.java&r2=125239
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/base/Subscription.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/Subscription.java Fri Jan 14 16:53:09 2005
@@ -15,103 +15,58 @@
*=============================================================================*/
package org.apache.ws.notification.base;
-import org.apache.axis.message.addressing.EndpointReferenceType;
-import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
+import org.apache.ws.pubsub.Filter;
import org.apache.ws.resource.Resource;
-import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.TopicExpressionType;
-import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryExpressionType;
-
-import java.util.Calendar;
+import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
/**
* Interface to be implemented by subscription resources. Exposes the information
* associated with a subscription request, as well as resource lifetime-related
* state.
*/
-public interface Subscription extends ScheduledResourceTerminationResource
+public interface Subscription extends org.apache.ws.pubsub.Subscription, ScheduledResourceTerminationResource
{
- /**
- * Is the subscription paused?
- *
- * @return True if the subscription is paused, false if not.
- */
- boolean isPaused();
-
- /**
- * Pause the subscription
- *
- * @throws Exception
- */
- void pause() throws Exception;
-
- /**
- * Resume the subscription
- *
- * @throws Exception
- */
- void resume() throws Exception;
/**
- * Get the consumer endpoint reference associated with this subscription
- *
- * @return The consumer endpoint reference
- */
- EndpointReferenceType getConsumerReference();
-
- /**
- * Get the producer endpoint reference associated with this subscription
- *
- * @return The producer endpoint reference
- */
- EndpointReferenceType getProducerReference();
-
- /**
- * Get the topic expression associated with this subscription
+ * Get the topic expression associated with this subscription.
*
* @return The topic expression
*/
- TopicExpressionType getTopicExpression();
+ Filter getTopicExpression();
/**
- * Get the precondition associated with this subscription
+ * Get the precondition associated with this subscription.
*
- * @return The precondition. May be null if no precondition was specified in the subscription.
+ * @return the precondition, or null if no precondition was specified in the subscription
*/
- QueryExpressionType getPrecondition();
+ QueryExpressionFilter getPrecondition();
/**
- * Get the selector expression associated with this subscription
+ * Get the selector expression associated with this subscription.
*
- * @return The selector. May be null if no selector was specified in the subscription.
+ * @return the selector, or null if no selector was specified in the subscription
*/
- QueryExpressionType getSelector();
+ QueryExpressionFilter getSelector();
/**
- * Get the policy associated with this subscription
+ * Get the policy associated with this subscription.
*
- * @return The policy. May be null if no policy was specified in the subscription.
+ * @return the policy, or null if no policy was specified in the subscription
*/
Object getSubscriptionPolicy();
/**
* Wrap notification messages in the notify element?
*
- * @return True (default) if notify should be used, false if not.
+ * @return true (default) if notify should be used, or false if not
*/
boolean getUseNotify();
/**
- * Get the producing resource
+ * Get the producing resource.
*
- * @return The producing resource
+ * @return the producing resource
*/
Resource getResource() throws Exception;
-
- /**
- * Get the time at which the resource was created.
- *
- * @return The creation time
- */
- Calendar getCreationTime();
}
Added: incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java?view=auto&rev=125239
==============================================================================
--- (empty file)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java Fri Jan 14 16:53:09 2005
@@ -0,0 +1,47 @@
+/*=============================================================================*
+ * Copyright 2004 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.ws.notification.tool;
+
+import org.apache.ws.notification.tool.v1_2.NotificationConsumerPortType2JavaInfo;
+import org.apache.ws.notification.tool.v1_2.NotificationProducerPortType2JavaInfo;
+import org.apache.ws.notification.tool.v1_2.SubscriptionManagerPortType2JavaInfo;
+import org.apache.ws.resource.tool.Wsdl2Java;
+
+import java.io.File;
+
+/**
+ * TODO
+ *
+ * @author Ian Springer (ian DOT springer AT hp DOT com)
+ */
+public class WsnWsdl2Java extends Wsdl2Java
+{
+
+ public WsnWsdl2Java( File[] wsdlFiles, File outputDir, File[] classpath, Wsdl2JavaOptions options )
+ throws Exception
+ {
+ super( wsdlFiles, outputDir, classpath, options );
+ initPortTypeInfoMap();
+ }
+
+ private void initPortTypeInfoMap()
+ {
+ addPortType2JavaInfo( new NotificationConsumerPortType2JavaInfo() );
+ addPortType2JavaInfo( new NotificationProducerPortType2JavaInfo() );
+ addPortType2JavaInfo( new SubscriptionManagerPortType2JavaInfo() );
+ }
+
+}
Added: incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/AbstractTopicExpression.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/AbstractTopicExpression.java?view=auto&rev=125239
==============================================================================
--- (empty file)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/AbstractTopicExpression.java Fri Jan 14 16:53:09 2005
@@ -0,0 +1,59 @@
+/*=============================================================================*
+ * Copyright 2004 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.ws.notification.topics.v1_2;
+
+import org.apache.ws.pubsub.Filter;
+import org.apache.ws.util.XmlBeanUtils;
+import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.TopicExpressionType;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * TODO
+ *
+ * @author Ian Springer (ian DOT springer AT hp DOT com)
+ */
+public abstract class AbstractTopicExpression implements Filter
+{
+
+ private String m_expr;
+ private URI m_dialect;
+
+ public AbstractTopicExpression( TopicExpressionType topicExprXBean )
+ {
+ m_expr = XmlBeanUtils.getValue( topicExprXBean );
+ try
+ {
+ m_dialect = new URI( topicExprXBean.getDialect() );
+ }
+ catch ( URISyntaxException urise )
+ {
+ throw new RuntimeException( urise );
+ }
+ }
+
+ public URI getDialect()
+ {
+ return m_dialect;
+ }
+
+ public Object getExpression()
+ {
+ return m_expr;
+ }
+
+}
Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/Topics1_2Constants.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/Topics1_2Constants.java?view=diff&rev=125239&p1=incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/Topics1_2Constants.java&r1=125238&p2=incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/Topics1_2Constants.java&r2=125239
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/Topics1_2Constants.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/v1_2/Topics1_2Constants.java Fri Jan 14 16:53:09 2005
@@ -32,5 +32,11 @@
* DOCUMENT_ME
*/
String NSPREFIX_WSTOP_SCHEMA = "wstop";
+
+ String TOPIC_EXPR_DIALECT_SIMPLE = "http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple";
+
+ String TOPIC_EXPR_DIALECT_CONCRETE = "http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Concrete";
+ String TOPIC_EXPR_DIALECT_FULL = "http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Full";
+
}
Modified: incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Filter.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Filter.java?view=diff&rev=125239&p1=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Filter.java&r1=125238&p2=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Filter.java&r2=125239
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Filter.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Filter.java Fri Jan 14 16:53:09 2005
@@ -15,16 +15,16 @@
*/
package org.apache.ws.pubsub;
-public interface Filter
-{
+import org.w3c.dom.Node;
- String getDialect();
+import java.net.URI;
- void setDialect( String dialect );
+public interface Filter
+{
- String getValue();
+ URI getDialect();
- void setValue( String value );
+ Object getExpression();
/**
*@link aggregation
Modified: incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationConsumer.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationConsumer.java?view=diff&rev=125239&p1=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationConsumer.java&r1=125238&p2=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationConsumer.java&r2=125239
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationConsumer.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationConsumer.java Fri Jan 14 16:53:09 2005
@@ -19,13 +19,14 @@
public interface NotificationConsumer
{
- EndpointReference getEPR();
-
- void setEPR( EndpointReference epr );
+ EndpointReference getEPR();
+ /**
+ * what's this for?
+ *
+ * @return
+ */
int getMode();
-
- void setMode( int mode );
void deliver( Filter filter, EndpointReference epr, Object message );
Modified: incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationProducer.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationProducer.java?view=diff&rev=125239&p1=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationProducer.java&r1=125238&p2=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationProducer.java&r2=125239
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationProducer.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/pubsub/NotificationProducer.java Fri Jan 14 16:53:09 2005
@@ -21,8 +21,9 @@
public interface NotificationProducer
{
- Subscription subscribe( EndpointReference notificationProducerEPR,
- NotificationConsumer notificationConsumer,
+ EndpointReference getEPR();
+
+ Subscription subscribe( NotificationConsumer notificationConsumer,
Filter filters[],
Calendar initialTerminationTime );
Deleted: /incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Status.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Status.java?view=auto&rev=125238
==============================================================================
Modified: incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Subscription.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Subscription.java?view=diff&rev=125239&p1=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Subscription.java&r1=125238&p2=incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Subscription.java&r2=125239
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Subscription.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/pubsub/Subscription.java Fri Jan 14 16:53:09 2005
@@ -15,15 +15,93 @@
*/
package org.apache.ws.pubsub;
+import org.apache.axis.message.addressing.EndpointReferenceType;
+
+import java.util.Calendar;
+import java.net.URI;
+
public interface Subscription
{
- void pause();
- void resume();
+ /**
+ * Pause the subscription.
+ *
+ * @throws Exception
+ */
+ void pause() throws Exception;
+
+ /**
+ * Resume the subscription.
+ *
+ * @throws Exception
+ */
+ void resume() throws Exception;
+
+ /**
+ * Is the subscription paused?
+ *
+ * @return true if the subscription is paused, false if not.
+ */
+ boolean isPaused();
+
+ /**
+ * Gets the termination time for this subscription (i.e. the time at which it expires).
+ *
+ * @return the termination time
+ */
+ Calendar getTerminationTime();
- void setTerminationTime();
+ /**
+ * Sets the termination time for this subscription (i.e. the time at which it expires).
+ *
+ * @param terminationTime the termination time
+ */
+ void setTerminationTime( Calendar terminationTime );
+ /**
+ * Cancel this subscription.
+ */
void unsubscribe();
- Status getStatus();
+ /**
+ * Returns a list of any notification filters that are associated
+ * with this subscription. The filters are ordered in the order in
+ * which they will be applied to notifications.
+ *
+ * @return a list of any notification filters that are associated
+ * with this subscription
+ */
+ Filter getFilters();
+
+ /**
+ * Returns the time at which this subscription was created.
+ *
+ * @return the time at which this subscription was created
+ */
+ Calendar getCreationTime();
+
+ /**
+ * Returns the delivery mode to be used for notifications sent for
+ * this subscription. If null, a delivery mode was not specified,
+ * and a default delivery mode will be used.
+ *
+ * @return the delivery mode to be used for notifications sent for
+ * this subscription
+ */
+ URI getDeliveryMode();
+
+ /**
+ * Get the consumer endpoint reference associated with this subscription.
+ *
+ * @return the consumer endpoint reference
+ */
+ EndpointReferenceType getConsumerEPR();
+
+ /**
+ * Get the producer endpoint reference associated with this subscription.
+ *
+ * @return the producer endpoint reference
+ */
+ EndpointReferenceType getProducerEPR();
+
}
Deleted: /incubator/hermes/trunk/src/java/org/apache/ws/pubsub/TopicFilter.java
Url: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/pubsub/TopicFilter.java?view=auto&rev=125238
==============================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: hermes-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: hermes-dev-help@ws.apache.org