/** * Returns a collection of configured inputs. * * @param args Collection arguments that specify the number of entities to * return and how to sort them. See {@link CollectionArgs}. * @return A collection of inputs. */ public InputCollection getInputs(Args args) { return new InputCollection(this, args); }
/** * Refreshes the {@code inputKinds} field on this object. */ private void refreshInputKinds() { Set<InputKind> kinds = assembleInputKindSet(new ArrayList<String>()); this.inputKinds.clear(); this.inputKinds.addAll(kinds); }
/** * Creates a new data input based on the input kind. * * @param name Depending on the type of data input, a string that contains: * <ul><li>The filename or directory and path (for monitor and oneshot * inputs)</li> * <li> The script name (for script inputs)</li> * <li> The port number (for TCP and UDP inputs)</li> * <li> The collection name (for Windows Perfmon and WMI inputs)</li> * <li> The stanza (for Windows Registry inputs)</li> * <li> The name of the configuration (for Windows AD inputs)</li></ul> * @param kind A member of {@code InputKind}, indicating the type of input. * @param <T> The implicit type of the input. * @return The {@code Input} that was created. */ public <T extends Input> T create(String name, InputKind kind) { return (T)create(name, kind, (Map<String, Object>)null); }
/** * Creates a new data input based on an Atom entry. * * @param entry The {@code AtomEntry} object describing the entry. * @return The {@code Input} that was created. */ @Override protected Input createItem(AtomEntry entry) { String path = itemPath(entry); InputKind kind = itemKind(path); Class inputClass = kind.getInputClass(); return createItem(inputClass, path, null); }
service.post(path, args); invalidate(); return (T)get(name);
@Override public void setup(OperatorContext context) { super.setup(context); tcpInput = (TcpInput) store.getService().getInputs().get(tcpPort); try { socket = tcpInput.attach(); stream = new DataOutputStream(socket.getOutputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
AtomFeed feed = AtomFeed.parseStream(response.getContent()); for (AtomEntry entry : feed.entries) { String itemKeyName = itemKey(entry); kinds.add(newKind); } else { Set<InputKind> subKinds = assembleInputKindSet(thisSubPath); kinds.addAll(subKinds);
refreshInputKinds(); throw new RuntimeException(e); load(feed);
@Override public void setup(OperatorContext context) { super.setup(context); tcpInput = (TcpInput)store.getService().getInputs().get(tcpPort); try { socket = tcpInput.attach(); stream = new DataOutputStream(socket.getOutputStream()); } catch (IOException e) { throw new RuntimeException(e); } }