Class: Quark::MdkDiscovery::Node
- Inherits:
-
DatawireQuarkCore::QuarkObject
- Object
- DatawireQuarkCore::QuarkObject
- Quark::MdkDiscovery::Node
- Extended by:
- DatawireQuarkCore::Static
- Defined in:
- lib/mdk_discovery.rb
Overview
server functioning as a service instance.
Constant Summary
Constants included from DatawireQuarkCore::Static
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
-
#_policy ⇒ Object
Returns the value of attribute _policy.
-
#address ⇒ Object
Returns the value of attribute address.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#id ⇒ Object
Returns the value of attribute id.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #__init_fields__ ⇒ Object
- #_getClass ⇒ Object
- #_getField(name) ⇒ Object
- #_setField(name, value) ⇒ Object
- #available ⇒ Object
- #failure ⇒ Object
-
#getId ⇒ Object
Return the ID of the node.
-
#initialize ⇒ Node
constructor
A new instance of Node.
- #success ⇒ Object
-
#toString ⇒ Object
Return a string representation of the Node.
Methods included from DatawireQuarkCore::Static
_lazy_statics, static, unlazy_statics
Methods inherited from DatawireQuarkCore::QuarkObject
Constructor Details
#initialize ⇒ Node
Returns a new instance of Node.
1433 1434 1435 1436 1437 |
# File 'lib/mdk_discovery.rb', line 1433 def initialize() self.__init_fields__ nil end |
Instance Attribute Details
#_policy ⇒ Object
Returns the value of attribute _policy.
1426 1427 1428 |
# File 'lib/mdk_discovery.rb', line 1426 def _policy @_policy end |
#address ⇒ Object
Returns the value of attribute address.
1426 1427 1428 |
# File 'lib/mdk_discovery.rb', line 1426 def address @address end |
#environment ⇒ Object
Returns the value of attribute environment.
1426 1427 1428 |
# File 'lib/mdk_discovery.rb', line 1426 def environment @environment end |
#id ⇒ Object
Returns the value of attribute id.
1426 1427 1428 |
# File 'lib/mdk_discovery.rb', line 1426 def id @id end |
#properties ⇒ Object
Returns the value of attribute properties.
1426 1427 1428 |
# File 'lib/mdk_discovery.rb', line 1426 def properties @properties end |
#service ⇒ Object
Returns the value of attribute service.
1426 1427 1428 |
# File 'lib/mdk_discovery.rb', line 1426 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
1426 1427 1428 |
# File 'lib/mdk_discovery.rb', line 1426 def version @version end |
Instance Method Details
#__init_fields__ ⇒ Object
1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 |
# File 'lib/mdk_discovery.rb', line 1567 def __init_fields__() self.id = nil self.service = nil self.version = nil self.address = nil self.properties = {} self.environment = ::Quark.mdk_protocol.OperationalEnvironment.new() self._policy = nil nil end |
#_getClass ⇒ Object
1505 1506 1507 1508 1509 1510 |
# File 'lib/mdk_discovery.rb', line 1505 def _getClass() return "mdk_discovery.Node" nil end |
#_getField(name) ⇒ Object
1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 |
# File 'lib/mdk_discovery.rb', line 1512 def _getField(name) if ((name) == ("id")) return (self).id end if ((name) == ("service")) return (self).service end if ((name) == ("version")) return (self).version end if ((name) == ("address")) return (self).address end if ((name) == ("properties")) return (self).properties end if ((name) == ("environment")) return (self).environment end if ((name) == ("_policy")) return (self)._policy end return nil nil end |
#_setField(name, value) ⇒ Object
1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 |
# File 'lib/mdk_discovery.rb', line 1540 def _setField(name, value) if ((name) == ("id")) (self).id = ::DatawireQuarkCore.cast(value) { ::String } end if ((name) == ("service")) (self).service = ::DatawireQuarkCore.cast(value) { ::String } end if ((name) == ("version")) (self).version = ::DatawireQuarkCore.cast(value) { ::String } end if ((name) == ("address")) (self).address = ::DatawireQuarkCore.cast(value) { ::String } end if ((name) == ("properties")) (self).properties = ::DatawireQuarkCore.cast(value) { ::Hash } end if ((name) == ("environment")) (self).environment = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_protocol.OperationalEnvironment } end if ((name) == ("_policy")) (self)._policy = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_discovery.FailurePolicy } end nil end |
#available ⇒ Object
1469 1470 1471 1472 1473 1474 |
# File 'lib/mdk_discovery.rb', line 1469 def available() return @_policy.available() nil end |
#failure ⇒ Object
1462 1463 1464 1465 1466 1467 |
# File 'lib/mdk_discovery.rb', line 1462 def failure() @_policy.failure() nil end |
#getId ⇒ Object
Return the ID of the node.
1445 1446 1447 1448 1449 1450 1451 1452 1453 |
# File 'lib/mdk_discovery.rb', line 1445 def getId() if ((@id) != (nil)) return @id end return ::DatawireQuarkCore.cast((@properties)["datawire_nodeId"]) { ::String } nil end |
#success ⇒ Object
1455 1456 1457 1458 1459 1460 |
# File 'lib/mdk_discovery.rb', line 1455 def success() @_policy.success() nil end |
#toString ⇒ Object
Return a string representation of the Node.
1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 |
# File 'lib/mdk_discovery.rb', line 1479 def toString() result = (("Node(id:") + (self.getId())) + (" ") if ((@service) == (nil)) result = (result) + ("<unnamed>") else result = (result) + (@service) end result = (result) + (": ") if ((@address) == (nil)) result = (result) + ("<unlocated>") else result = (result) + (@address) end if ((@version) != (nil)) result = ((result) + (", ")) + (@version) end result = (result) + (")") if ((@properties) != (nil)) result = ((result) + (" ")) + ((@properties).to_s) end return result nil end |