@Override public String toString() { return toString(""); }
/** * Returns the property if available or <code>null</code> otherwise. * Subproperties can be requested by submitting the sequence of properties. */ public Property getProperty(String... name) { if (name == null || name.length == 0) return null; for (Property p : properties) { if (Objects.equals(name[0], p.name)) { if (name.length == 1) return p; else return p.getProperty(Arrays.copyOfRange(name, 1, name.length)); } } return null; }
int incoming = incomingConnections.containsKey(stream) ? incomingConnections.get(stream) : 0; int outgoing = outgoingConnections.containsKey(stream) ? outgoingConnections.get(stream) : 0; streamProperties[i] = new Property("stream " + stream, null, new Property("nodes", incoming + outgoing), new Property("incoming", incoming), new Property("outgoing", outgoing) ); i++; return new Property("network", null, new Property("connectionManager", isRunning() ? "running" : "stopped"), new Property("connections", null, streamProperties), new Property("requestedObjects", requestedObjects.size()) );
int incoming = incomingConnections.containsKey(stream) ? incomingConnections.get(stream) : 0; int outgoing = outgoingConnections.containsKey(stream) ? outgoingConnections.get(stream) : 0; streamProperties[i] = new Property("stream " + stream, null, new Property("nodes", incoming + outgoing), new Property("incoming", incoming), new Property("outgoing", outgoing) ); i++; return new Property("network", null, new Property("connectionManager", running ? "running" : "stopped"), new Property("connections", null, streamProperties), new Property("requestedObjects", requestedObjects.size()) );
@Override public String toString() { return toString(""); }
public Property status() { return new Property("status", null, ctx.getNetworkHandler().getNetworkStatus() ); }