SessionsImpl Class
- java.
lang. Object - Sessions
- microsoft.
bonsai. simulatorapi. implementation. SessionsImpl
- microsoft.
public class SessionsImpl implements Sessions
An instance of this class provides access to all the operations defined in Sessions.
Constructor Summary
| Constructor | Description |
|---|---|
| SessionsImpl(Retrofit retrofit, SimulatorAPIImpl client) |
Initializes an instance of Sessions. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Event |
advance(String workspaceName, String sessionId, SimulatorState body)
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back. |
| Observable<Event> |
advanceAsync(String workspaceName, String sessionId, SimulatorState body)
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back. |
| ServiceFuture<Event> |
advanceAsync(String workspaceName, String sessionId, SimulatorState body, final ServiceCallback<Event> serviceCallback)
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back. |
| Observable<ServiceResponse<Event>> |
advanceWithServiceResponseAsync(String workspaceName, String sessionId, SimulatorState body)
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back. |
|
Simulator |
create(String workspaceName, SimulatorInterface body)
Registers a simulator with the Bonsai platform. |
|
Observable<Simulator |
createAsync(String workspaceName, SimulatorInterface body)
Registers a simulator with the Bonsai platform. |
|
ServiceFuture<Simulator |
createAsync(String workspaceName, SimulatorInterface body, final ServiceCallback<SimulatorSessionResponse> serviceCallback)
Registers a simulator with the Bonsai platform. |
|
Observable<ServiceResponse<Simulator |
createWithServiceResponseAsync(String workspaceName, SimulatorInterface body)
Registers a simulator with the Bonsai platform. |
| void |
delete(String workspaceName, String sessionId)
Deletes the Simulator session. |
| Observable<Void> |
deleteAsync(String workspaceName, String sessionId)
Deletes the Simulator session. |
| ServiceFuture<Void> |
deleteAsync(String workspaceName, String sessionId, final ServiceCallback<Void> serviceCallback)
Deletes the Simulator session. |
| Observable<ServiceResponse<Void>> |
deleteWithServiceResponseAsync(String workspaceName, String sessionId)
Deletes the Simulator session. |
|
Simulator |
get(String workspaceName, String sessionId)
Retrieves a simulator session corresponding to the sessionId. |
|
Observable<Simulator |
getAsync(String workspaceName, String sessionId)
Retrieves a simulator session corresponding to the sessionId. |
|
ServiceFuture<Simulator |
getAsync(String workspaceName, String sessionId, final ServiceCallback<SimulatorSessionResponse> serviceCallback)
Retrieves a simulator session corresponding to the sessionId. |
| Event |
getMostRecentAction(String workspaceName, String sessionId)
Gets the most recent action sent to the simulator to process. |
| Observable<Event> |
getMostRecentActionAsync(String workspaceName, String sessionId)
Gets the most recent action sent to the simulator to process. |
| ServiceFuture<Event> |
getMostRecentActionAsync(String workspaceName, String sessionId, final ServiceCallback<Event> serviceCallback)
Gets the most recent action sent to the simulator to process. |
| Observable<ServiceResponse<Event>> |
getMostRecentActionWithServiceResponseAsync(String workspaceName, String sessionId)
Gets the most recent action sent to the simulator to process. |
|
Observable<ServiceResponse<Simulator |
getWithServiceResponseAsync(String workspaceName, String sessionId)
Retrieves a simulator session corresponding to the sessionId. |
|
List<Simulator |
list(String workspaceName)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
|
List<Simulator |
list(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
|
Observable<List<Simulator |
listAsync(String workspaceName)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
|
ServiceFuture<List<Simulator |
listAsync(String workspaceName, final ServiceCallback<List<SimulatorSessionSummary>> serviceCallback)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
|
Observable<List<Simulator |
listAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
|
ServiceFuture<List<Simulator |
listAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter, final ServiceCallback<List<SimulatorSessionSummary>> serviceCallback)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
|
Observable<ServiceResponse<List<Simulator |
listWithServiceResponseAsync(String workspaceName)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
|
Observable<ServiceResponse<List<Simulator |
listWithServiceResponseAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}. |
Constructor Details
SessionsImpl
public SessionsImpl(Retrofit retrofit, SimulatorAPIImpl client)
Initializes an instance of Sessions.
Parameters:
Method Details
advance
public Event advance(String workspaceName, String sessionId, SimulatorState body)
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back.
Overrides:
SessionsImpl.advance(String workspaceName, String sessionId, SimulatorState body)Parameters:
Returns:
Throws:
advanceAsync
public Observable
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back.
Overrides:
SessionsImpl.advanceAsync(String workspaceName, String sessionId, SimulatorState body)Parameters:
Returns:
Throws:
advanceAsync
public ServiceFuture
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back.
Overrides:
SessionsImpl.advanceAsync(String workspaceName, String sessionId, SimulatorState body, final ServiceCallback<Event> serviceCallback)Parameters:
Returns:
Throws:
advanceWithServiceResponseAsync
public Observable
Advance the RL agent with the new state of the simulator, and returns an action computed by our policy. Simulatorsession is supposed to use the returned action for stepping inside the sim and thne getting the new state.false You can send the same state again, as long as you didn't get a Non-Idle Action back.
Overrides:
SessionsImpl.advanceWithServiceResponseAsync(String workspaceName, String sessionId, SimulatorState body)Parameters:
Returns:
Throws:
create
public SimulatorSessionResponse create(String workspaceName, SimulatorInterface body)
Registers a simulator with the Bonsai platform.
Overrides:
SessionsImpl.create(String workspaceName, SimulatorInterface body)Parameters:
Returns:
Throws:
createAsync
public Observable
Registers a simulator with the Bonsai platform.
Overrides:
SessionsImpl.createAsync(String workspaceName, SimulatorInterface body)Parameters:
Returns:
Throws:
createAsync
public ServiceFuture
Registers a simulator with the Bonsai platform.
Overrides:
SessionsImpl.createAsync(String workspaceName, SimulatorInterface body, final ServiceCallback<SimulatorSessionResponse> serviceCallback)Parameters:
Returns:
Throws:
createWithServiceResponseAsync
public Observable
Registers a simulator with the Bonsai platform.
Overrides:
SessionsImpl.createWithServiceResponseAsync(String workspaceName, SimulatorInterface body)Parameters:
Returns:
Throws:
delete
public void delete(String workspaceName, String sessionId)
Deletes the Simulator session.
Overrides:
SessionsImpl.delete(String workspaceName, String sessionId)Parameters:
Throws:
deleteAsync
public Observable
Deletes the Simulator session.
Overrides:
SessionsImpl.deleteAsync(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
deleteAsync
public ServiceFuture
Deletes the Simulator session.
Overrides:
SessionsImpl.deleteAsync(String workspaceName, String sessionId, final ServiceCallback<Void> serviceCallback)Parameters:
Returns:
Throws:
deleteWithServiceResponseAsync
public Observable
Deletes the Simulator session.
Overrides:
SessionsImpl.deleteWithServiceResponseAsync(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
get
public SimulatorSessionResponse get(String workspaceName, String sessionId)
Retrieves a simulator session corresponding to the sessionId.
Overrides:
SessionsImpl.get(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
getAsync
public Observable
Retrieves a simulator session corresponding to the sessionId.
Overrides:
SessionsImpl.getAsync(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
getAsync
public ServiceFuture
Retrieves a simulator session corresponding to the sessionId.
Overrides:
SessionsImpl.getAsync(String workspaceName, String sessionId, final ServiceCallback<SimulatorSessionResponse> serviceCallback)Parameters:
Returns:
Throws:
getMostRecentAction
public Event getMostRecentAction(String workspaceName, String sessionId)
Gets the most recent action sent to the simulator to process.
Overrides:
SessionsImpl.getMostRecentAction(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
getMostRecentActionAsync
public Observable
Gets the most recent action sent to the simulator to process.
Overrides:
SessionsImpl.getMostRecentActionAsync(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
getMostRecentActionAsync
public ServiceFuture
Gets the most recent action sent to the simulator to process.
Overrides:
SessionsImpl.getMostRecentActionAsync(String workspaceName, String sessionId, final ServiceCallback<Event> serviceCallback)Parameters:
Returns:
Throws:
getMostRecentActionWithServiceResponseAsync
public Observable
Gets the most recent action sent to the simulator to process.
Overrides:
SessionsImpl.getMostRecentActionWithServiceResponseAsync(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
getWithServiceResponseAsync
public Observable
Retrieves a simulator session corresponding to the sessionId.
Overrides:
SessionsImpl.getWithServiceResponseAsync(String workspaceName, String sessionId)Parameters:
Returns:
Throws:
list
public List
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.list(String workspaceName)Parameters:
Returns:
Throws:
list
public List
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.list(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter)Parameters:
Returns:
Throws:
listAsync
public Observable> listAsync(String workspaceName)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.listAsync(String workspaceName)Parameters:
Returns:
Throws:
listAsync
public ServiceFuture> listAsync(String workspaceName, final ServiceCallback
> serviceCallback)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.listAsync(String workspaceName, final ServiceCallback<List<SimulatorSessionSummary>> serviceCallback)Parameters:
Returns:
Throws:
listAsync
public Observable> listAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.listAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter)Parameters:
Returns:
Throws:
listAsync
public ServiceFuture> listAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter, final ServiceCallback
> serviceCallback)
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.listAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter, final ServiceCallback<List<SimulatorSessionSummary>> serviceCallback)Parameters:
Returns:
Throws:
listWithServiceResponseAsync
public Observable
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.listWithServiceResponseAsync(String workspaceName)Parameters:
Returns:
Throws:
listWithServiceResponseAsync
public Observable
Retrieves all of the simulators currently registered with all simulator gateways within this workspace. The deployment_mode appears in the query string. It can be one of Unspecified, Testing, or Hosted. If it has a 'neq:' prefix, that means "not;" e.g., {.../simulatorSessions?deployment_mode=neq:Hosted} means the response should not include simulators that are hosted. The session_status can be one of Attachable, Attached, Detaching, Rejected, and supports the neq: prefix. The collection appears in the query string The package appears in the query string The filter queries can appear together, like {.../simulatorSessions?deployment_mode=Hosted&collection=1234-455-33333}.
Overrides:
SessionsImpl.listWithServiceResponseAsync(String workspaceName, String deploymentMode, String sessionStatus, String collection, String packageParameter)Parameters:
Returns:
Throws: