for (String endpoint : _endpoints) {
Map<String, String> args = SiriLibrary.getLineAsMap(endpoint);
SiriClientRequest request = factory.createSubscriptionRequest(args);
SiriEndpointDetails context = new SiriEndpointDetails();
String agencyId = args.get("AgencyId");
if (agencyId != null)
context.getDefaultAgencyIds().add(agencyId);
String agencyIds = args.get("AgencyIds");
if (agencyIds != null) {
for (String id : agencyIds.split(","))
context.getDefaultAgencyIds().add(id);
}
request.setChannelContext(context);
_client.handleRequest(request);