Advertisement
Guest User

Untitled

a guest
Aug 14th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.28 KB | None | 0 0
  1. package com.example.teaarte.ssc.Models;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. /**
  6.  * Created by teaarte on 02.03.2017.
  7.  */
  8.  
  9. public class Monitor {
  10.     public int id = 0;
  11.     public boolean active = false;
  12.     public String name = "";
  13.     public int type = 0;
  14.     public String address = "";
  15.     public int auth = 0; //not bool/ 1- tru, 0 - false
  16.     public String username = "";
  17.     public String password = "";
  18.     public int period = 10;
  19.     public int period_in_error = 10;
  20.     public int notification = 0; //not bool/ 1- tru, 0 - false
  21.     public int notification_event = 0;
  22.     public int notification_chanel = 0;
  23.     public String notification_email = "";
  24.     public int timeout = 1;
  25.     public String search_in_page = "";
  26.     public ArrayList<Integer> errors = new ArrayList<>();
  27.     public int last_update_in = 0;
  28.     public boolean last_has_error = false;
  29.     public String address_dns = "";
  30.  
  31.  
  32.     //INFO
  33.     public int next_update_in = 0;
  34.     public ArrayList<Float> connection = new ArrayList<>();
  35.     public ArrayList<Float> time = new ArrayList<>();
  36.     public ArrayList<Float> speed = new ArrayList<>();
  37.     public ArrayList<Float> timeWait = new ArrayList<>();
  38.     public float uptime = 0;
  39.     public String stats = "";
  40.     public String stats_start_hour = "";
  41.     public String search_in_page_info = "";
  42.  
  43.     public String typeString() {
  44.  
  45.         /*
  46.             4 - 6    -- HTTPS (Get, Post, Head)
  47.             7 - FTP
  48.             8 - POP3
  49.             9 - SMTP
  50.             10 - IMAP
  51.             11 - Ping
  52.             12 - DNS
  53.          */
  54.         switch (type){
  55.             case 1:
  56.                 return "HTTP Get";
  57.             case 2:
  58.                 return "HTTP Post";
  59.             case 3:
  60.                 return "HTTP Head";
  61.             case 4:
  62.                 return "HTTPS GET";
  63.             case 5:
  64.                 return "HTTPS Post";
  65.             case 6:
  66.                 return "HTTPS Head";
  67.             case 7:
  68.                 return "FTP";
  69.             case 8:
  70.                 return "POP3";
  71.             case 9:
  72.                 return "SMTP";
  73.             case 10:
  74.                 return "IMAP";
  75.             case 11:
  76.                 return "Ping";
  77.             case 12:
  78.                 return "DNS";
  79.  
  80.  
  81.         }
  82.         return "";
  83.     }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement