ISubscriptionCallback callback, int oti) throws Exception {
// cascaded client not subscribed - subscribe
CascadedPublishService cascPublishService = cascClient.getPublishService();
// adapt NO_DATA_INTERVAL for cascaded client
msgToForward.setHeader(SCMPHeaderAttributeKey.NO_DATA_INTERVAL, cascPublishService.getNoDataIntervalSeconds());
SCMPCscSubscribeCall cscSubscribeCall = new SCMPCscSubscribeCall(this.requester, msgToForward);
// set cascaded mask in message
String tmpCscMask = msgToForward.getHeader(SCMPHeaderAttributeKey.CASCADED_MASK);
if (tmpCscMask == null) {
// its the case if a client is subscribing directly
tmpCscMask = msgToForward.getHeader(SCMPHeaderAttributeKey.MASK);
}
SubscriptionMask currentSubscriptionMask = cascClient.getSubscriptionMask();
if (currentSubscriptionMask != null) {
// cascaded client already has subscribed clients, figure out combined mask
tmpCscMask = SubscriptionMask.masking(currentSubscriptionMask, tmpCscMask);
}
msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, tmpCscMask);
CscSubscribeInactiveCascClientCallback cscCallback = new CscSubscribeInactiveCascClientCallback(callback, cascClient,
tmpCscMask);
cscSubscribeCall.invoke(cscCallback, oti);
}