Changes

Jump to: navigation, search

Template Method

274 bytes added, 19:56, 19 March 2007
Apache Tomcat
From the file '''Shm.java''', the following method is given.
<pre>
public void resetScoreboard int invoke(Msg msg, MsgContext ep ) throws IOException { if( apr==null ) return0; MsgContext mCtx=createMsgContextlog.debug("ChannelShm.invoke: " + ep ); Msg super.nativeDispatch( msg=, ep, JK_HANDLE_SHM_DISPATCH, 0 ); return 0; } </pre>In the ''''Shm14.java'''' file, the method from the base class is overridden with the following new one - its implementation changed, but the same structure.<pre> public int invoke(Msgmsg, MsgContext ep )mCtx throws IOException { if (log.getMsgisDebugEnabled(0);) msg log.resetdebug("ChannelShm14.invoke: " + ep );
msg.appendByte( SHM_RESET );//
this.invoke( msg, mCtx )return 0; }</pre>In the ''''Shm14.java'''' file, the method from the base class is overridden with the following new one. Its implementation is different.<pre> public void resetScoreboard() throws IOException { // XXX Need to write the head }
</pre>
Source from [https://svn.apache.org/repos/asf/tomcat/connectors/trunk/jk/java/org/apache/jk/common/ | Apache Tomcat Sample Code via Google Code Search]
== References ==
1
edit

Navigation menu