You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2007/03/18 00:58:37 UTC
svn commit: r519476 -
/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java
Author: meerajk
Date: Sat Mar 17 16:58:36 2007
New Revision: 519476
URL: http://svn.apache.org/viewvc?view=rev&rev=519476
Log:
Adaptor class for the listener.
Added:
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java (with props)
Added: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java?view=auto&rev=519476
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java (added)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java Sat Mar 17 16:58:36 2007
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tuscany.spi.services.work;
+
+/**
+ * Adaptor class for the notification listsner.
+ *
+ * @version $Revision$ $Date$
+ *
+ */
+public class NotificationListenerAdaptor<T extends Runnable> implements NotificationListener<T> {
+
+ /**
+ * Callback method when the unit of work is accepted.
+ *
+ * @param work Work that was accepted.
+ */
+ public void workAccepted(T work) {
+ }
+
+ /**
+ * Callback method when the unit of work is successfully completed.
+ *
+ * @param work Work that was succesfully completed.
+ */
+ public void workCompleted(T work) {
+ }
+
+ /**
+ * Callback when the unit of work is started.
+ *
+ * @param work Unit of work that was started.
+ */
+ public void workStarted(T work) {
+ }
+
+ /**
+ * Callback when the unit of work is rejected.
+ *
+ * @param work Unit of work that was rejected.
+ */
+ public void workRejected(T work) {
+ }
+
+ /**
+ * Callnack when the unit of work fails to complete.
+ *
+ * @param work Unit of work that failed to complete.
+ * @param error Error that caused the unit of work to fail.
+ */
+ public void workFailed(T work, Throwable error) {
+ error.printStackTrace();
+ }
+
+}
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/services/work/NotificationListenerAdaptor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org