Examples of StreamListResponse


Examples of org.graylog2.rest.resources.streams.responses.StreamListResponse

   
    @GET @Timed
    @ApiOperation(value = "Get a list of all streams")
    @Produces(MediaType.APPLICATION_JSON)
    public StreamListResponse get() {
        StreamListResponse response = new StreamListResponse();
        response.streams = new ArrayList<>();

        for (Stream stream : streamService.loadAll())
            if (isPermitted(RestPermissions.STREAMS_READ, stream.getId()))
                response.streams.add(stream);
View Full Code Here

Examples of org.graylog2.rest.resources.streams.responses.StreamListResponse

    @GET @Path("/enabled") @Timed
    @ApiOperation(value = "Get a list of all enabled streams")
    @Produces(MediaType.APPLICATION_JSON)
    public StreamListResponse getEnabled() throws NotFoundException {
        StreamListResponse response = new StreamListResponse();
        response.streams = new ArrayList<>();
        for (Stream stream : streamService.loadAllEnabled())
            if (isPermitted(RestPermissions.STREAMS_READ, stream.getId()))
                response.streams.add(stream);
        response.total = response.streams.size();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.