Class: PxnxJruby::SessionDirectoryNotification
- Inherits:
-
Object
- Object
- PxnxJruby::SessionDirectoryNotification
- Defined in:
- lib/pxnx_jruby/session_directory_notification.rb
Instance Attribute Summary collapse
-
#device_ip_address ⇒ Object
Returns the value of attribute device_ip_address.
-
#interface ⇒ Object
Returns the value of attribute interface.
-
#session ⇒ Object
Returns the value of attribute session.
Instance Method Summary collapse
-
#onChange(session) ⇒ Object
TODO: Test this method.
Instance Attribute Details
#device_ip_address ⇒ Object
Returns the value of attribute device_ip_address.
9 10 11 |
# File 'lib/pxnx_jruby/session_directory_notification.rb', line 9 def device_ip_address @device_ip_address end |
#interface ⇒ Object
Returns the value of attribute interface.
9 10 11 |
# File 'lib/pxnx_jruby/session_directory_notification.rb', line 9 def interface @interface end |
#session ⇒ Object
Returns the value of attribute session.
9 10 11 |
# File 'lib/pxnx_jruby/session_directory_notification.rb', line 9 def session @session end |
Instance Method Details
#onChange(session) ⇒ Object
TODO: Test this method. TODO: Properly create calls to start integration with the IP received.
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pxnx_jruby/session_directory_notification.rb', line 13 def onChange(session) # Log this session id. @session = session @interface = session.getInterface device_interfaces = @interface.getIpIntfIDs device = device_interfaces[0] @device_ip_address = device.get_ip_address connect_manager = PxnxJruby::ConnectionManager.instance log = LoggerFactory.getLogger(SessionDirectoryNotification.become_java!) log.info("Found new IP #{@device_ip_address} connecting to the network, assessing.") connect_manager.new_connection(@device_ip_address) end |