Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IPDSnelting
ppvm.exampleprojects
Commits
6ce8843d
Commit
6ce8843d
authored
Jan 13, 2017
by
martin.hecker
Browse files
minimales Akka/Java Beispiel
parent
9a0fb512
Changes
6
Hide whitespace changes
Inline
Side-by-side
eclipse-projects/akkaJavaExamples/.classpath
0 → 100644
View file @
6ce8843d
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
output=
"target/classes"
path=
"src"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
eclipse-projects/akkaJavaExamples/.project
0 → 100644
View file @
6ce8843d
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
akkaJavaExamples
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.m2e.core.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.m2e.core.maven2Nature
</nature>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
eclipse-projects/akkaJavaExamples/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
6ce8843d
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
eclipse-projects/akkaJavaExamples/.settings/org.eclipse.m2e.core.prefs
0 → 100644
View file @
6ce8843d
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
eclipse-projects/akkaJavaExamples/pom.xml
0 → 100644
View file @
6ce8843d
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
akkaJavaExamples
</groupId>
<artifactId>
akkaJavaExamples
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<build>
<sourceDirectory>
src
</sourceDirectory>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.1
</version>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>
com.typesafe.akka
</groupId>
<artifactId>
akka-actor_2.11
</artifactId>
<version>
2.4.11
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
eclipse-projects/akkaJavaExamples/src/akkaJavaExamples/HelloWorldActor.java
0 → 100644
View file @
6ce8843d
package
akkaJavaExamples
;
import
akka.actor.ActorRef
;
import
akka.actor.ActorSystem
;
import
akka.actor.Props
;
import
akka.actor.UntypedActor
;
public
class
HelloWorldActor
extends
UntypedActor
{
@Override
public
void
onReceive
(
Object
message
)
{
if
(
message
.
equals
(
"print"
))
{
System
.
out
.
println
(
"Hello World!"
);
getSender
().
tell
(
"printed"
,
getSelf
());
}
else
unhandled
(
message
);
}
public
static
void
main
(
String
[]
args
)
{
ActorSystem
actorSystem
=
ActorSystem
.
create
(
"MySystem"
);
ActorRef
helloWorldActor
=
actorSystem
.
actorOf
(
Props
.
create
(
HelloWorldActor
.
class
));
helloWorldActor
.
tell
(
"print"
,
ActorRef
.
noSender
());
actorSystem
.
terminate
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment