package com.microsoft.azure.servicebus;

import java.time.Duration;
import java.time.Instant;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;

import com.microsoft.azure.servicebus.primitives.ServiceBusException;

public interface IMessageSessionEntity {
//	int getSessionPrefetchCount();
//	
//	void setSessionPrefetchCount(int prefetchCount);
//
//    IMessageSession acceptMessageSession() throws InterruptedException, ServiceBusException;
//
//    IMessageSession acceptMessageSession(Duration serverWaitTime) throws InterruptedException, ServiceBusException;
//
//    IMessageSession acceptMessageSession(String sessionId) throws InterruptedException, ServiceBusException;
//
//    IMessageSession acceptMessageSession(String sessionId, Duration serverWaitTime) throws InterruptedException, ServiceBusException;
//
//    CompletableFuture<IMessageSession> acceptMessageSessionAsync();
//
//    CompletableFuture<IMessageSession> acceptMessageSessionAsync(Duration serverWaitTime);
//
//    CompletableFuture<IMessageSession> acceptMessageSessionAsync(String sessionId);
//
//    CompletableFuture<IMessageSession> acceptMessageSessionAsync(String sessionId, Duration serverWaitTime);
    
    Collection<IMessageSession> getMessageSessions() throws InterruptedException, ServiceBusException;

    Collection<IMessageSession> getMessageSessions(Instant lastUpdatedTime) throws InterruptedException, ServiceBusException;

    CompletableFuture<Collection<IMessageSession>> getMessageSessionsAsync();

    CompletableFuture<Collection<IMessageSession>> getMessageSessionsAsync(Instant lastUpdatedTime);
}

@@ -1,8 +1,160 @@
+// Copyright (c) Microsoft. All rights reserved.%0A// Licensed under the MIT license. See LICENSE file in the project root for full license information.%0A%0A
 package 
@@ -190,35 +190,8 @@
 s;%0A%0A
-import java.time.Duration;%0A
 impo
@@ -360,16 +360,68 @@
 ption;%0A%0A
+/**%0A * Represents a session full client entity.%0A */%0A
 public i
@@ -1391,322 +1391,1587 @@
 e);%0A
+%0A
     
-%0A    Collection%3CIMessageSession%3E getMessageSessions() throws InterruptedException, ServiceBusException;%0A%0A    Collection%3CIMessageSession%3E getMessageSessions(Instant lastUpdatedTime) throws InterruptedException, ServiceBusException;%0A%0A    CompletableFuture%3CCollection%3CIMessageSession%3E%3E getMessageSessionsAsync();%0A
+/**%0A     * Gets the message sessions, enabling you to browse sessions on queues.%0A     *%0A     * @return A collection of sessions.%0A     * @throws InterruptedException if the current thread was interrupted while waiting.%0A     * @throws ServiceBusException  if get sessions failed.%0A     */%0A    Collection%3CIMessageSession%3E getMessageSessions() throws InterruptedException, ServiceBusException;%0A%0A    /**%0A     * Retrieves all message sessions whose session state was updated since lastUpdatedTime.%0A     *%0A     * @param lastUpdatedTime The time the session was last updated.%0A     * @return A collection of sessions.%0A     * @throws InterruptedException if the current thread was interrupted while waiting.%0A     * @throws ServiceBusException  if get sessions failed.%0A     */%0A    Collection%3CIMessageSession%3E getMessageSessions(Instant lastUpdatedTime) throws InterruptedException, ServiceBusException;%0A%0A    /**%0A     * Asynchronously gets the message sessions, enabling you to browse sessions on queues.%0A     *%0A     * @return a CompletableFuture representing the pending operation to get sessions.%0A     * @see IMessageSessionEntity#getMessageSessions%0A     */%0A    CompletableFuture%3CCollection%3CIMessageSession%3E%3E getMessageSessionsAsync();%0A%0A    /**%0A     * Asynchronously retrieves all message sessions whose session state was updated since lastUpdatedTime.%0A     *%0A     * @param lastUpdatedTime The time the session was last updated.%0A     * @return a CompletableFuture representing the pending operation to get sessions.%0A     * @see IMessageSessionEntity#getMessageSessions(Instant)%0A     */
 %0A   

add javadoc for IMessageSessionEntity