congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StatsLogic
Code IndexAdd Tabnine to your IDE (free)

How to use
StatsLogic
in
cc.blynk.server.admin.http.logic

Best Java code snippets using cc.blynk.server.admin.http.logic.StatsLogic (Showing top 3 results out of 315)

origin: blynkkk/blynk-server

private List<IpNameResponse> searchByIP(String ip) {
  Set<IpNameResponse> res = new HashSet<>();
  int counter = 0;
  for (User user : userDao.users.values()) {
    if (user.lastLoggedIP != null) {
      String name = user.email + "-" + user.appName;
      if (ip == null) {
        res.add(new IpNameResponse(counter++, name, user.lastLoggedIP, "app"));
        for (DashBoard dashBoard : user.profile.dashBoards) {
          for (Device device : dashBoard.devices) {
            if (device.lastLoggedIP != null) {
              res.add(new IpNameResponse(counter++, name, device.lastLoggedIP, "hard"));
            }
          }
        }
      } else {
        if (user.lastLoggedIP.contains(ip) || deviceContains(user, ip)) {
          res.add(new IpNameResponse(counter++, name, user.lastLoggedIP, "hard"));
        }
      }
    }
  }
  return new ArrayList<>(res);
}
origin: blynkkk/blynk-server

@GET
@Path("/ips")
public Response getIps(@QueryParam("_filters") String filterParam,
            @QueryParam("_page") int page,
            @QueryParam("_perPage") int size,
            @QueryParam("_sortField") String sortField,
            @QueryParam("_sortDir") String sortOrder) {
  if (filterParam != null) {
    IpFilter filter = JsonParser.readAny(filterParam, IpFilter.class);
    filterParam = filter == null ? null : filter.ip;
  }
  return ok(sort(searchByIP(filterParam), sortField, sortOrder));
}
origin: blynkkk/blynk-server

var statsLogic = new StatsLogic(holder, rootPath);
var configsLogic = new ConfigsLogic(holder, rootPath);
var hardwareStatsLogic = new HardwareStatsLogic(holder, rootPath);
cc.blynk.server.admin.http.logicStatsLogic

Javadoc

The Blynk Project. Created by Dmitriy Dumanskiy. Created on 09.12.15.

Most used methods

  • <init>
  • deviceContains
  • searchByIP

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now