Reference Guide

Table Of Contents
import com.hp.api.Distributable
class ValidDistributableType implements Distributable {
}
class ValidDistributableType implements Distributable, Serializable {
}
class ValidDistributableType extends SerializableType implements
Distributable {
}
class InvalidDistributableType implements Serializable, Distributable {
}
Example of serializer registration:
@Component
public class Consumer {
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY, policy =
ReferencePolicy.DYNAMIC)
private volatile CoordinationService coordinationService;
@Activate
public void activate() {
coordinationService.registerSerializer(new
MyDistributableObjectSerializer(), MyDistributableObject.class);
}
@Deactivate
public void deactivate() {
coordinationService.unregisterSerializer(MyDistributableObject.class);
}
private static class MyDistributableObjectSerializer implements
Serializer<MyDistributableObject> {
@Override
public byte[] serialize(MyDistributableObject subject) {
...
}
@Override
public MyDistributableObject deserialize(byte[] serialization) throws
IllegalArgumentException {
...
}
}
}
Publish Subscribe Service
In a distributed environment, applications tend to communicate with each other. Applications might
be co-located on the same controller node or they may exist on different nodes of the same
controller cluster. The Publish Subscribe Service provides a way to accomplish this kind of
distributed communication mechanism. Note that communication can occur between the nodes of
a controller cluster and not across controller clusters. The Publish Subscribe Service provides a
mechanism where several applications on different controller nodes can register for various types
of bus messages, send and receive messages without worrying about delivery failures or out of
order delivery. When an application pushes a message, all the subscribers to that message type
for active members of the team are notified irrespective of their location in the controller cluster.
68