Package com.splunk

Examples of com.splunk.Input


    }

    @Override protected PropertyList getMetadata() {
        PropertyList list = super.getMetadata();
        list.add(InputKind.class, "getKind");
        Input input = (Input)value;
        InputKind kind = input.getKind();
        if (kind == InputKind.Monitor) {
            list.add(int.class, "getFileCount");
            list.add(String.class, "getHost");
            list.add(String.class, "getIndex");
            list.add(int.class, "getRcvBuf");
View Full Code Here


            Index index = mock(Index.class);
            IndexCollection indexColl = mock(IndexCollection.class);
            when(service.getIndexes()).thenReturn(indexColl);
            InputCollection inputCollection = mock(InputCollection.class);
            when(service.getInputs()).thenReturn(inputCollection);
            Input input = mock(Input.class);
            when(service.open(anyInt())).thenReturn(socket);
            when(inputCollection.get(anyString())).thenReturn(input);
            when(indexColl.get(anyString())).thenReturn(index);
            when(index.attach(isA(Args.class))).thenReturn(socket);
            when(socket.getOutputStream()).thenReturn(System.out);
View Full Code Here

        this.port = port;
    }

    @Override
    protected Socket createSocket(Service service) throws IOException {
        Input input = service.getInputs().get(String.valueOf(port));
        if (input == null) {
            throw new RuntimeException("no input defined for port " + port);
        }
        if (input.isDisabled()) {
            throw new RuntimeException(String.format("input on port %d is disabled", port));
        }
        Socket socket = service.open(port);
        return socket;
    }
View Full Code Here

TOP

Related Classes of com.splunk.Input

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.