Exception: UnseenConnectionsMonitor::FirewallWarning

Inherits:
StandardError
  • Object
show all
Defined in:
lib/unseen_connections_monitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from:, to:, protocol:, port:) ⇒ FirewallWarning

Returns a new instance of FirewallWarning.



13
14
15
16
# File 'lib/unseen_connections_monitor.rb', line 13

def initialize(from:, to:, protocol:, port:)
  super("unseen #{protocol} connection from #{from} to #{to}:#{port}")
  @from, @to, @protocol, @port = from, to, protocol, port
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



11
12
13
# File 'lib/unseen_connections_monitor.rb', line 11

def from
  @from
end

#portObject (readonly)

Returns the value of attribute port.



11
12
13
# File 'lib/unseen_connections_monitor.rb', line 11

def port
  @port
end

#protocolObject (readonly)

Returns the value of attribute protocol.



11
12
13
# File 'lib/unseen_connections_monitor.rb', line 11

def protocol
  @protocol
end

#toObject (readonly)

Returns the value of attribute to.



11
12
13
# File 'lib/unseen_connections_monitor.rb', line 11

def to
  @to
end

Instance Method Details

#==(other) ⇒ Object Also known as: eq?



22
23
24
# File 'lib/unseen_connections_monitor.rb', line 22

def ==(other)
  message == other.message
end

#paramsObject



18
19
20
# File 'lib/unseen_connections_monitor.rb', line 18

def params
  IdentifyUtil.ip_protocol_port(to, protocol, port).merge(from: from)
end