@Test public void testUnwrap() { AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(); JettyWrapper wrapper = new JettyWrapper(); msg.addObjectHeader(JettyConstants.JETTY_WRAPPER, wrapper); assertEquals(wrapper, JettyWrapper.unwrap(msg)); assertNotSame(wrapper, JettyWrapper.unwrap(AdaptrisMessageFactory.getDefaultInstance().newMessage())); }
protected static JettyWrapper unwrap(AdaptrisMessage msg) { JettyWrapper wrapper = (JettyWrapper) msg.getObjectHeaders().get(JETTY_WRAPPER); if (wrapper == null) { wrapper = new JettyWrapper(); } return wrapper; }
JettyWrapper { protected static JettyWrapper unwrap(AdaptrisMessage msg) { JettyWrapper wrapper = (JettyWrapper) msg.getObjectHeaders().get(JETTY_WRAPPER); if (wrapper == null) { wrapper = new JettyWrapper(); } return wrapper; } }
JettyWrapper { protected static JettyWrapper unwrap(AdaptrisMessage msg) { JettyWrapper wrapper = (JettyWrapper) msg.getObjectHeaders().get(JETTY_WRAPPER); if (wrapper == null) { wrapper = new JettyWrapper(); } return wrapper; } protected  JettyWrapper(); }
JettyWrapper { protected static JettyWrapper unwrap(AdaptrisMessage msg) { JettyWrapper wrapper = (JettyWrapper) msg.getObjectHeaders().get(JETTY_WRAPPER); if (wrapper == null) { wrapper = new JettyWrapper(); } return wrapper; } protected  JettyWrapper(); JettyConsumerMonitor getMonitor(); void setMonitor(JettyConsumerMonitor m); JettyWrapper withMonitor(JettyConsumerMonitor b); HttpServletResponse getResponse(); void setResponse(HttpServletResponse r); JettyWrapper withResponse(HttpServletResponse b); HttpServletRequest getRequest(); void setRequest(HttpServletRequest request); JettyWrapper withRequest(HttpServletRequest b); }
JettyWrapper { protected static JettyWrapper unwrap(AdaptrisMessage msg) { JettyWrapper wrapper = (JettyWrapper) msg.getObjectHeaders().get(JETTY_WRAPPER); if (wrapper == null) { wrapper = new JettyWrapper(); } return wrapper; } protected  JettyWrapper(); JettyConsumerMonitor getMonitor(); void setMonitor(JettyConsumerMonitor m); JettyWrapper withMonitor(JettyConsumerMonitor b); HttpServletResponse getResponse(); void setResponse(HttpServletResponse r); JettyWrapper withResponse(HttpServletResponse b); HttpServletRequest getRequest(); void setRequest(HttpServletRequest request); JettyWrapper withRequest(HttpServletRequest b);  }