Class ServiceAnnouncement


  • public class ServiceAnnouncement
    extends Object

    Purpose: A structured message object to announce a new RCM service instance becoming available

    Description: This object is sent over the multicast by a service wanting to join the EclipseLink cluster. It is received by all other services subscribing to the same channel. Receipt of this announcement triggers an exchange protocol between the sending and receiving services to establish communications with all of the other services on the channel.

    • Constructor Detail

      • ServiceAnnouncement

        public ServiceAnnouncement​(byte[] bytes)
        INTERNAL: Constructor to initialize a new instance when receiving a message
      • ServiceAnnouncement

        public ServiceAnnouncement​(ServiceId newServiceId)
        INTERNAL: Constructor to initialize a new instance when creating a message
    • Method Detail

      • readFromBytes

        public void readFromBytes​(byte[] bytes)
        INTERNAL: Initialize the instance fields from the serialized bytes. Assumptions: - Same character converters exist on the reading and storing sides - Strings are not greater than 255 bytes (bytes, not characters) Byte storage: - 1 byte to store length of String that is to follow - String of 'length' bytes follows
      • toBytes

        public byte[] toBytes()
        INTERNAL: Convert the instance attributes to serialized bytes. Assumptions: - Same character converters exist on the reading and storing sides - channel, id and converted to bytes < 256 bytes each Byte storage: - 1 byte to store length of String that is to follow - String of 'length' bytes follows
      • getServiceId

        public ServiceId getServiceId()
        INTERNAL: Return the id of the service sending this announcement