/** * Explicit Constructor. Create an instance of <code>AS2EnvelopQuerySender</code>. * * @param logger The logger for log the sending process. * @param ad The <code>AS2AdminData</code> for locating the HTTP end-point the request send to. * @throws NullPointerException When <code>p</code> is null. When the manage partnership end-point * from <code>ad</code> is null or empty. */ public AS2EnvelopQuerySender(FileLogger logger, AS2AdminData ad) { super(logger, ad); String endpoint = ad.getEnvelopQueryEndpoint(); if (endpoint == null || endpoint.equals("")) throw new NullPointerException("Missing 'Envelop Partnership endpoint' in AS2 Admin Data."); this.setServiceEndPoint(endpoint); this.setBasicAuthentication(ad.getUsername(), new String(ad.getPassword())); this.setMessageCriteriaToDownload(ad.getMessageIdCriteria(), ad.getMessageBoxCriteria()); }