org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor Java Examples
The following examples show how to use
org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor.
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: InterceptorSF.java From Tomcat8-Source-Read with MIT License | 6 votes |
@Override public void store(PrintWriter aWriter, int indent, Object aElement) throws Exception { if (aElement instanceof StaticMembershipInterceptor) { StoreDescription elementDesc = getRegistry().findDescription( aElement.getClass()); if (elementDesc != null) { if (log.isDebugEnabled()) log.debug(sm.getString("factory.storeTag", elementDesc.getTag(), aElement)); getStoreAppender().printIndent(aWriter, indent + 2); getStoreAppender().printOpenTag(aWriter, indent + 2, aElement, elementDesc); storeChildren(aWriter, indent + 2, aElement, elementDesc); getStoreAppender().printIndent(aWriter, indent + 2); getStoreAppender().printCloseTag(aWriter, elementDesc); } else { if (log.isWarnEnabled()) log.warn(sm.getString("factory.storeNoDescriptor", aElement.getClass())); } } else { super.store(aWriter, indent, aElement); } }
Example #2
Source File: InterceptorSF.java From Tomcat8-Source-Read with MIT License | 3 votes |
/** * Store the specified Interceptor child. * * @param aWriter * PrintWriter to which we are storing * @param indent * Number of spaces to indent this element * @param aInterceptor * Channel whose properties are being stored * * @exception Exception * if an exception occurs while storing */ @Override public void storeChildren(PrintWriter aWriter, int indent, Object aInterceptor, StoreDescription parentDesc) throws Exception { if (aInterceptor instanceof StaticMembershipInterceptor) { ChannelInterceptor interceptor = (ChannelInterceptor) aInterceptor; // Store nested <Member> elements storeElementArray(aWriter, indent + 2, interceptor.getMembers()); } }