apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yogi Devendra <yogideven...@apache.org>
Subject Overriding input port annotations from parent class
Date Tue, 31 May 2016 14:22:07 GMT

Here is my scenario:

1. Class A with DefaultInputPort<byte[]> input.
2. Class B extends A with DefaultInputPort<String> stringInput.
3. Class A does NOT define optional=true for input.
4. In Class B, I want to specify that any one of input, stringInput should
be connected.
(OR making both of them as optional is also fine for now).
5. Tuples from both the ports are essentially getting processed in similar
fashion. I just want to give flexibility to the end user exposing one more
port with String type.

How should I override port annotations for input from parent class A to
make it optional? (without touching source code of A)

I tried to use variable shadowing in Java on variable name input. App ran
successfully using this. But, is there any better way than variable

~ Yogi

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message