mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
[core] Add convenience constructor to AbstractStreamOpen
Most of the times when we construct a stream-open-like element, we want the jabber:client namespace. Hence add a constructor that does select the namespace implicitly.
This commit is contained in:
parent
2a9671ca93
commit
e6a60213b6
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2020 Aditya Borikar
|
* Copyright 2020 Florian Schmaus, Aditya Borikar
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -60,6 +60,10 @@ public abstract class AbstractStreamOpen implements Nonza {
|
||||||
*/
|
*/
|
||||||
protected final String contentNamespace;
|
protected final String contentNamespace;
|
||||||
|
|
||||||
|
public AbstractStreamOpen(CharSequence to, CharSequence from, String id, String lang) {
|
||||||
|
this(to, from, id, lang, StreamContentNamespace.client);
|
||||||
|
}
|
||||||
|
|
||||||
public AbstractStreamOpen(CharSequence to, CharSequence from, String id, String lang, StreamContentNamespace ns) {
|
public AbstractStreamOpen(CharSequence to, CharSequence from, String id, String lang, StreamContentNamespace ns) {
|
||||||
this.to = StringUtils.maybeToString(to);
|
this.to = StringUtils.maybeToString(to);
|
||||||
this.from = StringUtils.maybeToString(from);
|
this.from = StringUtils.maybeToString(from);
|
||||||
|
|
Loading…
Reference in a new issue