void (List<ResponseHandler> responseHandlers) { myResponseHandlersMap.clear(); for (ResponseHandler handler : responseHandlers) { myResponseHandlersMap.put(handler.getResponseType(), handler); } // ResponseHandler#repository field is excluded from serialization to prevent // circular dependency so it has to be done manually during serialization process for (ResponseHandler handler : myResponseHandlersMap.values()) { handler.setRepository(this); } }