use of com.microsoft.azure.management.servicebus.ServiceBusNamespace in project azure-sdk-for-java by Azure.
the class ServiceBusNamespaceImpl method createResourceAsync.
@Override
public Observable<ServiceBusNamespace> createResourceAsync() {
Completable createNamespaceCompletable = this.manager().inner().namespaces().createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()).map(new Func1<NamespaceInner, NamespaceInner>() {
@Override
public NamespaceInner call(NamespaceInner inner) {
setInner(inner);
return inner;
}
}).toCompletable();
Completable childrenOperationsCompletable = submitChildrenOperationsAsync();
final ServiceBusNamespace self = this;
return Completable.concat(createNamespaceCompletable, childrenOperationsCompletable).doOnTerminate(new Action0() {
@Override
public void call() {
initChildrenOperationsCache();
}
}).andThen(Observable.just(self));
}
Aggregations