Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | package com.framsticks.core; |
---|
2 | |
---|
3 | import com.framsticks.params.annotations.FramsClassAnnotation; |
---|
4 | import com.framsticks.parsers.XmlLoader; |
---|
5 | import com.framsticks.util.dispatching.Joinable; |
---|
6 | import com.framsticks.util.dispatching.JoinableCollection; |
---|
7 | import com.framsticks.util.dispatching.Monitor; |
---|
8 | |
---|
9 | import org.apache.logging.log4j.Logger; |
---|
10 | import org.apache.logging.log4j.LogManager; |
---|
11 | |
---|
12 | import java.io.InputStream; |
---|
13 | |
---|
14 | /** |
---|
15 | * @author Piotr Sniegowski |
---|
16 | */ |
---|
17 | @FramsClassAnnotation |
---|
18 | public class Framsticks extends JoinableCollection<Joinable> { |
---|
19 | private static final Logger log = LogManager.getLogger(Framsticks.class); |
---|
20 | |
---|
21 | public Framsticks() { |
---|
22 | |
---|
23 | } |
---|
24 | |
---|
25 | public static Framsticks loadConfiguration(InputStream stream) { |
---|
26 | return new XmlLoader().load(Framsticks.class, stream); |
---|
27 | } |
---|
28 | |
---|
29 | public static void main(final String[] args) { |
---|
30 | |
---|
31 | String config = "/framsticks.xml"; |
---|
32 | if (args.length != 0) { |
---|
33 | config = args[0]; |
---|
34 | } |
---|
35 | |
---|
36 | new Monitor(loadConfiguration(Framsticks.class.getResourceAsStream(config))).use().waitFor().drop().join(); |
---|
37 | |
---|
38 | log.debug("exiting main"); |
---|
39 | } |
---|
40 | |
---|
41 | @Override |
---|
42 | public String toString() { |
---|
43 | return "framsticks"; |
---|
44 | } |
---|
45 | |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.