Search in sources :

Example 1 with ChannelReceiver

use of org.apache.catalina.tribes.ChannelReceiver in project tomcat by apache.

the class ChannelSF method storeChildren.

/**
     * Store the specified Channel children.
     *
     * @param aWriter
     *            PrintWriter to which we are storing
     * @param indent
     *            Number of spaces to indent this element
     * @param aChannel
     *            Channel whose properties are being stored
     *
     * @exception Exception
     *                if an exception occurs while storing
     */
@Override
public void storeChildren(PrintWriter aWriter, int indent, Object aChannel, StoreDescription parentDesc) throws Exception {
    if (aChannel instanceof Channel) {
        Channel channel = (Channel) aChannel;
        if (channel instanceof ManagedChannel) {
            ManagedChannel managedChannel = (ManagedChannel) channel;
            // Store nested <Membership> element
            MembershipService service = managedChannel.getMembershipService();
            if (service != null) {
                storeElement(aWriter, indent, service);
            }
            // Store nested <Sender> element
            ChannelSender sender = managedChannel.getChannelSender();
            if (sender != null) {
                storeElement(aWriter, indent, sender);
            }
            // Store nested <Receiver> element
            ChannelReceiver receiver = managedChannel.getChannelReceiver();
            if (receiver != null) {
                storeElement(aWriter, indent, receiver);
            }
            Iterator<ChannelInterceptor> interceptors = managedChannel.getInterceptors();
            while (interceptors.hasNext()) {
                ChannelInterceptor interceptor = interceptors.next();
                storeElement(aWriter, indent, interceptor);
            }
        }
    }
}
Also used : ChannelReceiver(org.apache.catalina.tribes.ChannelReceiver) ManagedChannel(org.apache.catalina.tribes.ManagedChannel) Channel(org.apache.catalina.tribes.Channel) MembershipService(org.apache.catalina.tribes.MembershipService) ChannelInterceptor(org.apache.catalina.tribes.ChannelInterceptor) ChannelSender(org.apache.catalina.tribes.ChannelSender) ManagedChannel(org.apache.catalina.tribes.ManagedChannel)

Aggregations

Channel (org.apache.catalina.tribes.Channel)1 ChannelInterceptor (org.apache.catalina.tribes.ChannelInterceptor)1 ChannelReceiver (org.apache.catalina.tribes.ChannelReceiver)1 ChannelSender (org.apache.catalina.tribes.ChannelSender)1 ManagedChannel (org.apache.catalina.tribes.ManagedChannel)1 MembershipService (org.apache.catalina.tribes.MembershipService)1