openSession method

  1. @override
Future<SessionV1?> openSession(
  1. String? correlationId,
  2. String? user_id,
  3. String? user_name,
  4. String? address,
  5. String? client,
  6. dynamic user,
  7. dynamic data,
)
override

Creates a new session.

  • correlation_id (optional) transaction id to trace execution through call chain.
  • user_id an user id of created session.
  • user_name an user name of created session.
  • address an address of created session.
  • client a client of created session.
  • user an user of created session.
  • data an data of created session. Return (optional) Future that receives created session or error.

Implementation

@override
Future<SessionV1?> openSession(String? correlationId, String? user_id,
    String? user_name, String? address, String? client, user, data) {
  var session = SessionV1(
      id: IdGenerator.nextLong(),
      user_id: user_id,
      user_name: user_name,
      address: address,
      client: client);
  session.user = user;
  session.data = data;
  return persistence.create(correlationId, session);
}