@Test public void untargetedQueryEndsUpInInitiatingEntityArchive() throws XMLSemanticError { archives.givenArchive(INITIATING_ENTITY.getBareJID()); List<Stanza> stanzas = tested.handle(untargetedQuery, serverRuntimeContext, sessionContext); assertEquals(1, stanzas.size()); Stanza stanza = stanzas.get(0); assertEquals("iq", stanza.getName()); assertNotNull(stanza.getSingleInnerElementsNamed("fin")); }
@Override public List<Stanza> handle(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext) { try { return doHandle(query, serverRuntimeContext, sessionContext); } catch (XMLSemanticError xmlSemanticError) { Stanza internalServerError = ServerErrorResponses.getStanzaError(StanzaErrorCondition.INTERNAL_SERVER_ERROR, query.iqStanza(), StanzaErrorType.CANCEL, null, null, null); return Collections.singletonList(internalServerError); } }
UserArchiveQueryHandler implements QueryHandler { @Override public List<Stanza> handle(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext) { try { return doHandle(query, serverRuntimeContext, sessionContext); } catch (XMLSemanticError xmlSemanticError) { Stanza internalServerError = ServerErrorResponses.getStanzaError(StanzaErrorCondition.INTERNAL_SERVER_ERROR, query.iqStanza(), StanzaErrorType.CANCEL, null, null, null); return Collections.singletonList(internalServerError); } } }
UserArchiveQueryHandler implements QueryHandler { @Override public List<Stanza> handle(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext) { try { return doHandle(query, serverRuntimeContext, sessionContext); } catch (XMLSemanticError xmlSemanticError) { Stanza internalServerError = ServerErrorResponses.getStanzaError(StanzaErrorCondition.INTERNAL_SERVER_ERROR, query.iqStanza(), StanzaErrorType.CANCEL, null, null, null); return Collections.singletonList(internalServerError); } }  }
UserArchiveQueryHandler implements QueryHandler { @Override public List<Stanza> handle(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext) { try { return doHandle(query, serverRuntimeContext, sessionContext); } catch (XMLSemanticError xmlSemanticError) { Stanza internalServerError = ServerErrorResponses.getStanzaError(StanzaErrorCondition.INTERNAL_SERVER_ERROR, query.iqStanza(), StanzaErrorType.CANCEL, null, null, null); return Collections.singletonList(internalServerError); } }  @Override boolean supports(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext); @Override List<Stanza> handle(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext); }
UserArchiveQueryHandler implements QueryHandler { @Override public List<Stanza> handle(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext) { try { return doHandle(query, serverRuntimeContext, sessionContext); } catch (XMLSemanticError xmlSemanticError) { Stanza internalServerError = ServerErrorResponses.getStanzaError(StanzaErrorCondition.INTERNAL_SERVER_ERROR, query.iqStanza(), StanzaErrorType.CANCEL, null, null, null); return Collections.singletonList(internalServerError); } }  @Override boolean supports(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext); @Override List<Stanza> handle(Query query, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext);  }