private static List<String> getSubscriptionIds(Packet packet) { HeadersExtension headers = (HeadersExtension)packet.getExtension("headers", "http://jabber.org/protocol/shim"); List<String> values = null; if (headers != null) { values = new ArrayList<String>(headers.getHeaders().size()); for (Header header : headers.getHeaders()) { values.add(header.getValue()); } } return values; }
private static List<String> getSubscriptionIds(Packet packet) { HeadersExtension headers = (HeadersExtension) packet.getExtension( "headers", "http://jabber.org/protocol/shim"); List<String> values = null; if (headers != null) { values = new ArrayList<String>(headers.getHeaders().size()); for (Header header : headers.getHeaders()) { values.add(header.getValue()); } } return values; }
@Override protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content) { return new HeadersExtension((Collection<Header>)content); }
@Override protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content) { return new HeadersExtension((Collection<Header>) content); }