NotificationSender.java revision 1af2df7a6d4ca36f75815037fad3be449b478a46
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: NotificationSender.java,v 1.4 2008/06/25 05:41:34 qcheng Exp $
*
*/
/**
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
public class NotificationSender {
private NotificationSet set;
url = u;
set = s;
}
public void run() throws SendNotificationException {
try {
conn.setDoOutput(true);
conn.setRequestProperty(TransactionId.HTTP_HEADER, AuditRequestContext.createSubTransactionIdValue());
// compute length in case iWS set arbitrary length
}
// Input ...
// We need to check the response so that the high level services
// or applications can clean things up such as removing the
// notification
// URLs of the apps in case the apps died.
// Read input stream fully
.getInputStream()));
}
throw new SendNotificationException(PLLBundle
.getString("sendNotificationFailed"));
}
} catch (Exception e) {
// FIXME: Currently we ignore the exception received here, because
// not all the agent answers with 'OK' if the notification was
// received, see OPENAM-498 (and linked RFE) for more details.
} finally {
try {
conn.disconnect();
}
}
} catch (IOException e) {
}
}
}
}