diff --git a/akka-actor/src/main/scala/akka/actor/Props.scala b/akka-actor/src/main/scala/akka/actor/Props.scala index f6552179c3..dfd6200fd3 100644 --- a/akka-actor/src/main/scala/akka/actor/Props.scala +++ b/akka-actor/src/main/scala/akka/actor/Props.scala @@ -146,7 +146,7 @@ case class Props( /** * Returns a new Props with the specified creator set. - * + * * The creator must not return the same instance multiple times. * * Scala API. diff --git a/akka-docs/java/code/docs/pattern/JavaTemplate.java b/akka-docs/java/code/docs/pattern/JavaTemplate.java new file mode 100644 index 0000000000..7e6fd175fb --- /dev/null +++ b/akka-docs/java/code/docs/pattern/JavaTemplate.java @@ -0,0 +1,18 @@ +/** + * Copyright (C) 2009-2012 Typesafe Inc. + */ + +package docs.pattern; + +// this part will not appear in the docs + +//#all-of-it +class JavaTemplate { + public JavaTemplate() { + System.out.println("Hello, Template!"); + } + //#uninteresting-stuff + // don’t show this plumbimg + //#uninteresting-stuff +} +//#all-of-it diff --git a/akka-docs/java/howto.rst b/akka-docs/java/howto.rst new file mode 100644 index 0000000000..333fb9e498 --- /dev/null +++ b/akka-docs/java/howto.rst @@ -0,0 +1,33 @@ + +.. _howto-java: + +###################### +HowTo: Common Patterns +###################### + +This section lists common actor patterns which have been found to be useful, +elegant or instructive. Anything is welcome, example topics being message +routing strategies, supervision patterns, restart handling, etc. As a special +bonus, additions to this section are marked with the contributor’s name, and it +would be nice if every Akka user who finds a recurring pattern in his or her +code could share it for the profit of all. Where applicable it might also make +sense to add to the ``akka.pattern`` package for creating an `OTP-like library +`_. + +Template Pattern +================ + +*Contributed by: N. N.* + +This is an especially nice pattern, since it does even come with some empty example code: + +.. includecode:: code/docs/pattern/JavaTemplate.java + :include: all-of-it + :exclude: uninteresting-stuff + +.. note:: + + Spread the word: this is the easiest way to get famous! + +Please keep this pattern at the end of this file. + diff --git a/akka-docs/java/index.rst b/akka-docs/java/index.rst index 981e07f869..4022092dba 100644 --- a/akka-docs/java/index.rst +++ b/akka-docs/java/index.rst @@ -24,3 +24,4 @@ Java API extending-akka zeromq microkernel + howto diff --git a/akka-docs/scala/code/docs/pattern/ScalaTemplate.scala b/akka-docs/scala/code/docs/pattern/ScalaTemplate.scala new file mode 100644 index 0000000000..beceae17b7 --- /dev/null +++ b/akka-docs/scala/code/docs/pattern/ScalaTemplate.scala @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2009-2012 Typesafe Inc. + */ + +package docs.pattern + +// this part will not appear in the docs + +//#all-of-it +class ScalaTemplate { + println("Hello, Template!") + //#uninteresting-stuff + // don’t show this plumbimg + //#uninteresting-stuff +} +//#all-of-it diff --git a/akka-docs/scala/howto.rst b/akka-docs/scala/howto.rst new file mode 100644 index 0000000000..9436480327 --- /dev/null +++ b/akka-docs/scala/howto.rst @@ -0,0 +1,33 @@ + +.. _howto-scala: + +###################### +HowTo: Common Patterns +###################### + +This section lists common actor patterns which have been found to be useful, +elegant or instructive. Anything is welcome, example topics being message +routing strategies, supervision patterns, restart handling, etc. As a special +bonus, additions to this section are marked with the contributor’s name, and it +would be nice if every Akka user who finds a recurring pattern in his or her +code could share it for the profit of all. Where applicable it might also make +sense to add to the ``akka.pattern`` package for creating an `OTP-like library +`_. + +Template Pattern +================ + +*Contributed by: N. N.* + +This is an especially nice pattern, since it does even come with some empty example code: + +.. includecode:: code/docs/pattern/ScalaTemplate.scala + :include: all-of-it + :exclude: uninteresting-stuff + +.. note:: + + Spread the word: this is the easiest way to get famous! + +Please keep this pattern at the end of this file. + diff --git a/akka-docs/scala/index.rst b/akka-docs/scala/index.rst index fc1b619e26..ddceb9fcf8 100644 --- a/akka-docs/scala/index.rst +++ b/akka-docs/scala/index.rst @@ -28,3 +28,4 @@ Scala API zeromq microkernel camel + howto