Clover coverage report - Maven Clover report
Coverage timestamp: Sun Jun 1 2008 19:59:48 EST
file stats: LOC: 48   Methods: 4
NCLOC: 23   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
PayloadMsgDispatcher.java - 0% 0% 0%
coverage
 1    /**
 2    * Copyright 2006 The Apache Software Foundation
 3    *
 4    * Licensed under the Apache License, Version 2.0 (the "License");
 5    * you may not use this file except in compliance with the License.
 6    * You may obtain a copy of the License at
 7    *
 8    * http://www.apache.org/licenses/LICENSE-2.0
 9    *
 10    * Unless required by applicable law or agreed to in writing, software
 11    * distributed under the License is distributed on an "AS IS" BASIS,
 12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13    * See the License for the specific language governing permissions and
 14    * limitations under the License.
 15    */
 16    package org.codehaus.wadi.group.impl;
 17   
 18    import java.io.Serializable;
 19    import java.lang.reflect.Method;
 20    import org.codehaus.wadi.group.Dispatcher;
 21    import org.codehaus.wadi.group.Envelope;
 22   
 23    /**
 24    *
 25    * @version $Revision: 1603 $
 26    */
 27    class PayloadMsgDispatcher extends AbstractMsgMethodDispatcher {
 28    private final ThreadLocal _singleton = new ThreadLocal() {
 29  0 protected Object initialValue() {
 30  0 return new Object[1];
 31    }
 32    };
 33   
 34  0 public PayloadMsgDispatcher(Dispatcher dispatcher, Object target, Method method, Class type) {
 35  0 super(dispatcher, target, method, type);
 36    }
 37   
 38  0 public void dispatch(Envelope envelope) throws Exception {
 39  0 Object[] singleton = (Object[]) _singleton.get();
 40  0 singleton[0] = envelope.getPayload();
 41  0 Object response = invoke(singleton);
 42  0 _dispatcher.reply(envelope, (Serializable) response);
 43    }
 44   
 45  0 public String toString() {
 46  0 return "<PayloadMsgDispatcher: " + _method + " dispatched on: " + _target + ">";
 47    }
 48    }