EBMSPartnershipSender¶
-
public class
EBMSPartnershipSender
extends PartnershipSender¶ The
EBMSPartnershipSender
is a client service sender using HTTP protocol for maintaining the set of EBMS Partnership in Hermes 2 Messaging Gateway. To use it you have to provide the configuration instance calledEBMSAdminData
. it defines the URL end-point and credential for connecting to your Hermes 2 Restricted area. An Example for adding partnership :// Create an administrative data for configuration. EBMSAdminData adminData = new EBMSAdminData(); adminData.setManagePartnershipEndpoint("Your H2O location"); adminData.setUsername("Your username for logging H2O"); adminData.setPassword("Your password for logging H2O"); // Create a partnership data for doing maintenance operation. EBMSPartnershipData pData = new EBMSPartnershipData(); . . . EBMSPartnershipData sender = new EBMSPartnershipData(someLogger, adminData, pData); sender.setExecuteOperation(PartnershipOp.Add); sender.run();
Note for setting the manage partnership end-point You should add /admin/ebms/partnership to your H2O host. For example, ‘http://localhost:8080/admin/ebms/partnership‘. Technical Information The
EBMSPartnershipSender
will generate a HTTP multi-part request to the manage partnership end-point. The request includes all parameter extracted from theEBMSPartnershipData
, each of them is represented as either text/plain multi-part, or application binary multi-part (for thecertificates
). The type of partnership operation to execute also append at the end of the HTTP request in a text multi-part form.Author: Twinsen Tsang See also:
hk.hku.cecid.corvus.ws.data.EBMSAdminData
,hk.hku.cecid.corvus.ws.data.EBMSPartnershipData
,hk.hku.cecid.corvus.http.PartnershipOp
Constructors¶
EBMSPartnershipSender¶
-
public
EBMSPartnershipSender
(FileLogger logger, EBMSAdminData ad, EBMSPartnershipData p)¶ Explicit Constructor. Create an instance of
EBMSPartnershipSender
Parameters: - logger – The logger for log the sending process.
- ad – The
EBMSAdminData
for locating the HTTP end-point the request send to. - p – The
EBMSPartnershipData