THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Merge (Sending-/Receiving-)LinkEndpoint and (Sending-/Receiving-)Link; Remove LinkAttachment
- Create Terminus Interface with methods to associate/dissociate a LinkEndpoint and maintain delivery states
- Make Source and Target Derive from Terminus and move the (non-durable) delivery state bookkeeping from the LinkEndpoint to the Terminus
- Create class for the LinkRegistry.
- encapsulate remoteContainer in the registry
- values are Termini
- replace current Map<containerId, LinkRegistry> on VH with new LinkRegistry
In receiveAttach:
Code Block | ||||
---|---|---|---|---|
| ||||
void receiveAttach(Attach attach) {
source, target = getAddressSpace().getLinkRegistry().getSendingLink(getConnection().getLocalContainerId(),
getConnection().getRemoteContainerId(),
attach.getLinkName(),
attach.getSource(),
attach.getTarget());
if (source == null) {
establishLink(attach);
} else {
if (attach.getSource() == null) {
recoverLink(attach, source, target);
} else {
if (source.getAssociatedLinkEndpoint() == null) {
resumeLink(attach, source, target);
} else {
if (source.getAssociatedLinkEndpoint().getSession() != this) {
stealLink(attach, source, target);
} else {
reattachLink(attach, source, target);
}
}
}
}
}
|
LinkRegistry API
- LinkRegistry.putSendingLinkIfAbsent(String localContainerId, String remoteContrainerId, String linkName, Source source, Target target) -> boolean> Pair<Source, Target>
- LinkRegistry.putReceivingLinkIfAbsent(String localContainerId, String remoteContrainerId, String linkName, Source source, Target target) -> boolean> Pair<Source, Target>
- LinkRegistry.getSendvingLink(String localContainerId, String remoteContrainerId, String linkName) -> Pair<Source, Target>
- LinkRegistry.getReceivingLink(String localContainerId, String remoteContrainerId, String linkName) -> Pair<Source, Target>
- LinkRegistry.removeSendingLink(String localContainerId, String remoteContrainerId, String linkName) -> boolean> Pair<Source, Target>
- LinkRegistry.removeReceivingLink(String localContainerId, String remoteContrainerId, String linkName) -> boolean
- VH.putIfAbsentLink(String remoteContrainerId, String linkName, Terminus terminus) -> Terminus
- VH.getLink(String remoteContrainerId, String linkName) -> Terminus
- > Pair<Source, Target>VH.removeLink(String remoteContrainerId, String linkName) -> Terminus