Top Description Fields Constructors Methods
org.eclipse.persistence.internal.sessions.coordination

public Class ServiceAnnouncement

extends Object
Class Inheritance
Imports
org.eclipse.persistence.sessions.coordination.ServiceId

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.

Field Summary

Modifier and TypeField and Description
pack-priv ServiceId
serviceId

The id information of the sending service

Constructor Summary

AccessConstructor and Description
public
ServiceAnnouncement(byte[] bytes)

INTERNAL: Constructor to initialize a new instance when receiving a message

public
ServiceAnnouncement(ServiceId newServiceId)

INTERNAL: Constructor to initialize a new instance when creating a message

Method Summary

Modifier and TypeMethod and Description
public ServiceId
getServiceId()

INTERNAL: Return the id of the service sending this announcement

public void
readFromBytes(byte[] bytes)

INTERNAL: Initialize the instance fields from the serialized bytes.

public byte[]
toBytes()

INTERNAL: Convert the instance attributes to serialized bytes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serviceIdback to summary
pack-priv ServiceId serviceId

The id information of the sending service

Constructor Detail

ServiceAnnouncementback to summary
public ServiceAnnouncement(byte[] bytes)

INTERNAL: Constructor to initialize a new instance when receiving a message

ServiceAnnouncementback to summary
public ServiceAnnouncement(ServiceId newServiceId)

INTERNAL: Constructor to initialize a new instance when creating a message

Method Detail

getServiceIdback to summary
public ServiceId getServiceId()

INTERNAL: Return the id of the service sending this announcement

readFromBytesback to summary
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

toBytesback to summary
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