Changeset 960593bbc3d124660d33345738153237349d5310
- Timestamp:
- 05/22/12 22:07:25
(1 year ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1337724445 -0400
- git-parent:
[2534eec9709c2c836a34394e9854dda289f8a208]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1337724445 -0400
- Message:
make the StratconMessage? implementation use the interface where not tied to esper
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r24c830d |
r960593b |
|
| 14 | 14 | import java.lang.reflect.Method; |
|---|
| 15 | 15 | import java.lang.reflect.InvocationTargetException; |
|---|
| | 16 | import com.omniti.reconnoiter.IEventHandler; |
|---|
| 16 | 17 | import com.omniti.reconnoiter.event.*; |
|---|
| 17 | 18 | |
|---|
| … | … | |
| 69 | 70 | public int numparts() { return 0; } |
|---|
| 70 | 71 | |
|---|
| 71 | | public abstract void handle(EventHandler eh); |
|---|
| | 72 | public abstract void handle(IEventHandler eh); |
|---|
| 72 | 73 | |
|---|
| 73 | 74 | public StratconMessage() {} |
|---|
| rf7b7c1e |
r960593b |
|
| 10 | 10 | |
|---|
| 11 | 11 | import java.util.LinkedList; |
|---|
| 12 | | import com.omniti.reconnoiter.EventHandler; |
|---|
| | 12 | import com.omniti.reconnoiter.IEventHandler; |
|---|
| 13 | 13 | import com.omniti.reconnoiter.event.NoitEvent; |
|---|
| 14 | 14 | import com.omniti.reconnoiter.event.NoitStatus; |
|---|
| … | … | |
| 102 | 102 | |
|---|
| 103 | 103 | public int numparts() { return 9; } |
|---|
| 104 | | public void handle(EventHandler eh) { |
|---|
| | 104 | public void handle(IEventHandler eh) { |
|---|
| 105 | 105 | for(NoitEvent e : items) { |
|---|
| 106 | 106 | if (eh.stopProcessing(e, getPrefix()) == false) |
|---|
| r8c720f9 |
r960593b |
|
| 9 | 9 | package com.omniti.reconnoiter.event; |
|---|
| 10 | 10 | |
|---|
| 11 | | import com.omniti.reconnoiter.EventHandler; |
|---|
| | 11 | import com.omniti.reconnoiter.IEventHandler; |
|---|
| 12 | 12 | import com.omniti.reconnoiter.StratconMessage; |
|---|
| 13 | 13 | |
|---|
| … | … | |
| 33 | 33 | return parts; |
|---|
| 34 | 34 | } |
|---|
| 35 | | public void handle(EventHandler eh) { |
|---|
| 36 | | eh.getService().getEPRuntime().sendEvent(this); |
|---|
| | 35 | public void handle(IEventHandler eh) { |
|---|
| | 36 | eh.sendEvent(this); |
|---|
| 37 | 37 | } |
|---|
| 38 | 38 | } |
|---|
| r2534eec |
r960593b |
|
| 9 | 9 | package com.omniti.reconnoiter.event; |
|---|
| 10 | 10 | |
|---|
| 11 | | import com.omniti.reconnoiter.EventHandler; |
|---|
| | 11 | import com.omniti.reconnoiter.IEventHandler; |
|---|
| 12 | 12 | import com.omniti.reconnoiter.StratconMessage; |
|---|
| 13 | 13 | import com.omniti.reconnoiter.event.NoitMetricNumeric; |
|---|
| … | … | |
| 34 | 34 | } |
|---|
| 35 | 35 | } |
|---|
| 36 | | public void handle(EventHandler eh) { |
|---|
| | 36 | public void handle(IEventHandler eh) { |
|---|
| 37 | 37 | long start = System.nanoTime(); |
|---|
| 38 | 38 | if(nmn != null) eh.sendEvent(nmn); |
|---|
| r2534eec |
r960593b |
|
| 86 | 86 | } |
|---|
| 87 | 87 | |
|---|
| 88 | | public void handle(EventHandler eh) { |
|---|
| | 88 | public void handle(IEventHandler ieh) { |
|---|
| | 89 | EventHandler eh = (EventHandler)ieh; |
|---|
| 89 | 90 | eh.deregisterQuery(getUUID()); |
|---|
| 90 | 91 | |
|---|
| rd483232 |
r960593b |
|
| 12 | 12 | import com.omniti.reconnoiter.StratconMessage; |
|---|
| 13 | 13 | import com.omniti.reconnoiter.EventHandler; |
|---|
| | 14 | import com.omniti.reconnoiter.IEventHandler; |
|---|
| 14 | 15 | |
|---|
| 15 | 16 | public class StratconQueryStop extends StratconQueryBase { |
|---|
| … | … | |
| 31 | 32 | public int numparts() { return 3; } |
|---|
| 32 | 33 | |
|---|
| 33 | | public void handle(EventHandler eh) { |
|---|
| | 34 | public void handle(IEventHandler ieh) { |
|---|
| | 35 | EventHandler eh = (EventHandler)ieh; |
|---|
| 34 | 36 | eh.deregisterQuery(getUUID()); |
|---|
| 35 | 37 | } |
|---|
| rd483232 |
r960593b |
|
| 11 | 11 | import com.omniti.reconnoiter.event.StratconQueryBase; |
|---|
| 12 | 12 | import com.omniti.reconnoiter.EventHandler; |
|---|
| | 13 | import com.omniti.reconnoiter.IEventHandler; |
|---|
| 13 | 14 | import com.espertech.esper.client.EPStatement; |
|---|
| 14 | 15 | import com.espertech.esper.client.UpdateListener; |
|---|
| … | … | |
| 36 | 37 | public int numparts() { return 4; } |
|---|
| 37 | 38 | |
|---|
| 38 | | public void handle(EventHandler eh) { |
|---|
| | 39 | public void handle(IEventHandler ieh) { |
|---|
| | 40 | EventHandler eh = (EventHandler)ieh; |
|---|
| 39 | 41 | eh.deregisterQuery(getUUID()); |
|---|
| 40 | 42 | EPStatement statement = eh.getService().getEPAdministrator().createEPL(getExpression()); |
|---|