*/
static void injectProtocolAdapter(Object handler, HttpProtocolAdapter adapter) {
Field[] fields = handler.getClass().getDeclaredFields();
for (Field field : fields) {
if (field.isAnnotationPresent(Resource.class)) {
Resource res = field.getAnnotation(Resource.class);
if ((field.getType() == HttpProtocolAdapter.class) || (res.type() == HttpProtocolAdapter.class)) {
field.setAccessible(true);
try {
field.set(handler, adapter);
} catch (IllegalAccessException iae) {
LOG.warning("could not set HandlerContext for attribute " + field.getName() + ". Reason " + iae.toString());