activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r961176 - /activemq/sandbox/activemq-apollo-actor/activemq-util/src/main/scala/org/apache/activemq/apollo/ServiceTrait.scala
Date Wed, 07 Jul 2010 04:14:01 GMT
Author: chirino
Date: Wed Jul  7 04:14:01 2010
New Revision: 961176

URL: http://svn.apache.org/viewvc?rev=961176&view=rev
Log:
Adding enriched service trait.

Added:
    activemq/sandbox/activemq-apollo-actor/activemq-util/src/main/scala/org/apache/activemq/apollo/ServiceTrait.scala

Added: activemq/sandbox/activemq-apollo-actor/activemq-util/src/main/scala/org/apache/activemq/apollo/ServiceTrait.scala
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-util/src/main/scala/org/apache/activemq/apollo/ServiceTrait.scala?rev=961176&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-util/src/main/scala/org/apache/activemq/apollo/ServiceTrait.scala
(added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-util/src/main/scala/org/apache/activemq/apollo/ServiceTrait.scala
Wed Jul  7 04:14:01 2010
@@ -0,0 +1,38 @@
+/**
+ * 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.activemq.apollo
+
+import org.apache.activemq.Service
+import org.fusesource.hawtdispatch.ScalaDispatch
+
+/**
+ * <p>
+ * </p>
+ *
+ * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
+ */
+trait ServiceTrait extends Service {
+
+  def start(func: =>Unit ):Unit = {
+    start( ScalaDispatch.runnable( func _ ) )
+  }
+
+  def stop(func: =>Unit ):Unit = {
+    stop( ScalaDispatch.runnable( func _ ) )
+  }
+
+}
\ No newline at end of file



Mime
View raw message