throws TopicNotSupportedFault, PublisherRegistrationFailedFault,
UnacceptableInitialTerminationTimeFault, InvalidTopicExpressionFault, ResourceUnknownFault,
PublisherRegistrationRejectedFault {
//CHECKSTYLE:ON
RegisterPublisher registerPublisherRequest = new RegisterPublisher();
registerPublisherRequest.setPublisherReference(publisher.getEpr());
if (topics != null) {
for (String topic : topics) {
TopicExpressionType topicExp = new TopicExpressionType();
topicExp.getContent().add(topic);
registerPublisherRequest.getTopic().add(topicExp);
}
}
registerPublisherRequest.setDemand(demand);
RegisterPublisherResponse response = broker.registerPublisher(registerPublisherRequest);
return new Registration(response.getPublisherRegistrationReference());
}