Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.4 -- added the Error emission type.
- Loading branch information
Chris Chew
committed
Feb 1, 2012
1 parent
a8110e1
commit c811b4a
Showing
4 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
version=0.3 | ||
version=0.4 | ||
javac.source=1.6 | ||
javac.debug=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.pearson.sigint.emitter.types; | ||
|
||
import com.pearson.sigint.emitter.PublishProvider; | ||
import com.pearson.sigint.emitter.SIGINTConfig.FORMAT; | ||
|
||
public class Error extends Emission<Error> { | ||
public static String TYPE() { return "e"; } | ||
|
||
public Error(Throwable error, String app, String node, PublishProvider publisher, FORMAT format) { | ||
super(app, node, publisher, format); | ||
setData(new ErrorData(error.getMessage())); | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return TYPE(); | ||
} | ||
|
||
public Error againstApplication(String a) { | ||
setAgainst(a); | ||
return this; | ||
} | ||
|
||
public Error operation(String o) { | ||
return _operation(o); | ||
} | ||
|
||
protected class ErrorData { | ||
private final String msg; | ||
|
||
public ErrorData(String msg) { | ||
super(); | ||
this.msg = msg; | ||
} | ||
|
||
public String getMsg() { | ||
return msg; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters