Search in sources :

Example 1 with StreamConnection

use of com.ibm.streams.flow.declare.StreamConnection in project streamsx.topology by IBMStreams.

the class BInputPort method complete.

/**
     * Add this port information and its connections to output ports, by name.
     */
@Override
public JSONObject complete() {
    final JSONObject json = json();
    BUtils.addPortInfo(json, port);
    JSONArray conns = new JSONArray();
    for (StreamConnection c : port().getConnections()) {
        conns.add(c.getOutput().getName());
    }
    json.put("connections", conns);
    return json;
}
Also used : JSONObject(com.ibm.json.java.JSONObject) JSONArray(com.ibm.json.java.JSONArray) StreamConnection(com.ibm.streams.flow.declare.StreamConnection)

Example 2 with StreamConnection

use of com.ibm.streams.flow.declare.StreamConnection in project streamsx.topology by IBMStreams.

the class BOutputPort method complete.

@Override
public JSONObject complete() {
    final JSONObject json = json();
    BUtils.addPortInfo(json, port);
    JSONArray conns = new JSONArray();
    for (StreamConnection c : port().getConnections()) {
        conns.add(c.getInput().getName());
    }
    json.put("connections", conns);
    return json;
}
Also used : JSONObject(com.ibm.json.java.JSONObject) JSONArray(com.ibm.json.java.JSONArray) StreamConnection(com.ibm.streams.flow.declare.StreamConnection)

Aggregations

JSONArray (com.ibm.json.java.JSONArray)2 JSONObject (com.ibm.json.java.JSONObject)2 StreamConnection (com.ibm.streams.flow.declare.StreamConnection)2