Last change
on this file 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
|
Rev | Line | |
---|
[88] | 1 | package com.framsticks.core; |
---|
| 2 | |
---|
| 3 | import com.framsticks.params.annotations.FramsClassAnnotation; |
---|
| 4 | import com.framsticks.parsers.XmlLoader; |
---|
[96] | 5 | import com.framsticks.util.dispatching.Joinable; |
---|
[88] | 6 | import com.framsticks.util.dispatching.JoinableCollection; |
---|
[90] | 7 | import com.framsticks.util.dispatching.Monitor; |
---|
[88] | 8 | |
---|
[100] | 9 | import org.apache.logging.log4j.Logger; |
---|
| 10 | import org.apache.logging.log4j.LogManager; |
---|
[88] | 11 | |
---|
| 12 | import java.io.InputStream; |
---|
| 13 | |
---|
| 14 | /** |
---|
| 15 | * @author Piotr Sniegowski |
---|
| 16 | */ |
---|
| 17 | @FramsClassAnnotation |
---|
[96] | 18 | public class Framsticks extends JoinableCollection<Joinable> { |
---|
[100] | 19 | private static final Logger log = LogManager.getLogger(Framsticks.class); |
---|
[88] | 20 | |
---|
| 21 | public Framsticks() { |
---|
[99] | 22 | |
---|
[88] | 23 | } |
---|
| 24 | |
---|
| 25 | public static Framsticks loadConfiguration(InputStream stream) { |
---|
[90] | 26 | return new XmlLoader().load(Framsticks.class, stream); |
---|
[88] | 27 | } |
---|
| 28 | |
---|
| 29 | public static void main(final String[] args) { |
---|
| 30 | |
---|
[101] | 31 | String config = "/framsticks.xml"; |
---|
[97] | 32 | if (args.length != 0) { |
---|
| 33 | config = args[0]; |
---|
| 34 | } |
---|
[88] | 35 | |
---|
[97] | 36 | new Monitor(loadConfiguration(Framsticks.class.getResourceAsStream(config))).use().waitFor().drop().join(); |
---|
| 37 | |
---|
[96] | 38 | log.debug("exiting main"); |
---|
[88] | 39 | } |
---|
| 40 | |
---|
| 41 | @Override |
---|
| 42 | public String toString() { |
---|
| 43 | return "framsticks"; |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.