org.apache.catalina.tribes.ChannelSender Java Examples

The following examples show how to use org.apache.catalina.tribes.ChannelSender. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChannelCoordinator.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
public ChannelCoordinator(ChannelReceiver receiver,
                          ChannelSender sender,
                          MembershipService service) {

    this.optionFlag = Channel.SEND_OPTIONS_BYTE_MESSAGE |
            Channel.SEND_OPTIONS_USE_ACK |
            Channel.SEND_OPTIONS_SYNCHRONIZED_ACK;

    this.setClusterReceiver(receiver);
    this.setClusterSender(sender);
    this.setMembershipService(service);
}
 
Example #2
Source File: ChannelSF.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
/**
 * 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);
            }
        }
   }
}
 
Example #3
Source File: ChannelCoordinator.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
public ChannelCoordinator(ChannelReceiver receiver,
                          ChannelSender sender,
                          MembershipService service) {
    this();
    this.setClusterReceiver(receiver);
    this.setClusterSender(sender);
    this.setMembershipService(service);
}
 
Example #4
Source File: ChannelCoordinator.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
public ChannelCoordinator(ChannelReceiver receiver,
                          ChannelSender sender,
                          MembershipService service) {
    this();
    this.setClusterReceiver(receiver);
    this.setClusterSender(sender);
    this.setMembershipService(service);
}
 
Example #5
Source File: ChannelCoordinator.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
public ChannelSender getClusterSender() {
    return clusterSender;
}
 
Example #6
Source File: ChannelCoordinator.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
public void setClusterSender(ChannelSender clusterSender) {
    this.clusterSender = clusterSender;
}
 
Example #7
Source File: GroupChannel.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
/**
 * Returns the channel sender component
 * @return ChannelSender
 */
@Override
public ChannelSender getChannelSender() {
    return coordinator.getClusterSender();
}
 
Example #8
Source File: GroupChannel.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
/**
 * Sets the channel sender component
 * @param clusterSender ChannelSender
 */
@Override
public void setChannelSender(ChannelSender clusterSender) {
    coordinator.setClusterSender(clusterSender);
}
 
Example #9
Source File: ChannelCoordinator.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
public ChannelSender getClusterSender() {
    return clusterSender;
}
 
Example #10
Source File: ChannelCoordinator.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
public void setClusterSender(ChannelSender clusterSender) {
    this.clusterSender = clusterSender;
}
 
Example #11
Source File: GroupChannel.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
/**
 * Returns the channel sender component
 * @return ChannelSender
 */
@Override
public ChannelSender getChannelSender() {
    return coordinator.getClusterSender();
}
 
Example #12
Source File: GroupChannel.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
/**
 * Sets the channel sender component
 * @param clusterSender ChannelSender
 */
@Override
public void setChannelSender(ChannelSender clusterSender) {
    coordinator.setClusterSender(clusterSender);
}
 
Example #13
Source File: ChannelCoordinator.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
public ChannelSender getClusterSender() {
    return clusterSender;
}
 
Example #14
Source File: ChannelCoordinator.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
public void setClusterSender(ChannelSender clusterSender) {
    this.clusterSender = clusterSender;
}
 
Example #15
Source File: GroupChannel.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
/**
 * Returns the channel sender component
 * @return ChannelSender
 */
@Override
public ChannelSender getChannelSender() {
    return coordinator.getClusterSender();
}
 
Example #16
Source File: GroupChannel.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
/**
 * Sets the channel sender component
 * @param clusterSender ChannelSender
 */
@Override
public void setChannelSender(ChannelSender clusterSender) {
    coordinator.setClusterSender(clusterSender);
}