Created
September 6, 2013 16:59
-
-
Save jimbaker/6466609 to your computer and use it in GitHub Desktop.
Example code emitted by CustomMaker support, as decompiled by $ java -jar procyon-decompiler-0.5.19.jar otter/romper/topology/PolicyBolt.class
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
package otter.romper.topology; | |
import backtype.storm.topology.base.*; | |
import org.python.core.*; | |
import java.util.*; | |
import org.python.compiler.*; | |
import backtype.storm.topology.*; | |
import backtype.storm.task.*; | |
import backtype.storm.tuple.*; | |
@APIVersion(33) | |
@MTime(-1L) | |
public class PolicyBolt extends BaseRichBolt implements PyProxy, ClassDictInit | |
{ | |
protected PyObject __proxy; | |
protected transient PySystemState __systemState; | |
public static final long serialVersionUID; | |
public void _setPyInstance(final PyObject _proxy) { | |
this.__proxy = _proxy; | |
} | |
public PyObject _getPyInstance() { | |
return this.__proxy; | |
} | |
public void _setPySystemState(final PySystemState _systemState) { | |
this.__systemState = _systemState; | |
} | |
public PySystemState _getPySystemState() { | |
return this.__systemState; | |
} | |
public void __initProxy__(final Object[] array) { | |
Py.initProxy((PyProxy)this, "romper.topology", "PolicyBolt", array); | |
} | |
public PolicyBolt() { | |
super(); | |
this.__initProxy__(Py.EmptyObjects); | |
} | |
public Map getComponentConfiguration() { | |
final PyObject findPython = ProxyMaker.findPython((PyProxy)this, "getComponentConfiguration"); | |
if (findPython == null) { | |
return super.getComponentConfiguration(); | |
} | |
return (Map)Py.tojava(findPython._jcall((Object[])Py.EmptyObjects), (Class)Class.forName("java.util.Map")); | |
} | |
public Map super__getComponentConfiguration() { | |
return super.getComponentConfiguration(); | |
} | |
public void finalize() { | |
super.finalize(); | |
} | |
public Object clone() { | |
return super.clone(); | |
} | |
public void declareOutputFields(final OutputFieldsDeclarer outputFieldsDeclarer) { | |
final PyObject findPython = ProxyMaker.findPython((PyProxy)this, "declareOutputFields"); | |
if (findPython != null) { | |
Py.py2void(findPython._jcall(new Object[] { outputFieldsDeclarer })); | |
return; | |
} | |
} | |
public void prepare(final Map map, final TopologyContext topologyContext, final OutputCollector outputCollector) { | |
final PyObject findPython = ProxyMaker.findPython((PyProxy)this, "prepare"); | |
if (findPython != null) { | |
Py.py2void(findPython._jcall(new Object[] { map, topologyContext, outputCollector })); | |
return; | |
} | |
} | |
public void execute(final Tuple tuple) { | |
final PyObject findPython = ProxyMaker.findPython((PyProxy)this, "execute"); | |
if (findPython != null) { | |
Py.py2void(findPython._jcall(new Object[] { tuple })); | |
return; | |
} | |
} | |
static { | |
serialVersionUID = 1L; | |
} | |
public static void classDictInit(final PyObject pyObject) { | |
pyObject.__setitem__("__supernames__", Py.java2py((Object)new String[] { "clone", "super__getComponentConfiguration", "finalize" })); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment