Interface Profiles

All Superinterfaces:
EngineService

public interface Profiles extends EngineService
A service for managing Chromium profiles.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the default profile instance.
    void
    delete(Profile profile)
    Deletes the given profile from the list of available profiles, closes all browsers associated with it, releases all allocated resources and files in the user data directory.
    Returns an immutable list of the available profiles including the default profile.
    Creates a new incognito Profile instance with the given name.
    Creates a new Profile instance with the given name.

    Methods inherited from interface com.teamdev.jxbrowser.engine.EngineService

    engine
  • Method Details

    • list

      List<Profile> list()
      Returns an immutable list of the available profiles including the default profile.
      Throws:
      ObjectClosedException - when the engine is closed and this service is not available anymore
    • defaultProfile

      Profile defaultProfile()
      Returns the default profile instance.
      Throws:
      ObjectClosedException - when the engine is closed and this service is not available anymore
    • newProfile

      Profile newProfile(String name)
      Creates a new Profile instance with the given name.
      Parameters:
      name - a name of the profile, cannot be empty or blank
      Throws:
      IllegalArgumentException - when name is empty or blank
      ObjectClosedException - when the engine is closed and this service is not available anymore
    • newIncognitoProfile

      Profile newIncognitoProfile(String name)
      Creates a new incognito Profile instance with the given name.
      Parameters:
      name - a name of the profile. Cannot be empty or blank
      Throws:
      IllegalArgumentException - when name is empty or blank
      ObjectClosedException - when the engine is closed and this service is not available anymore
    • delete

      void delete(Profile profile)
      Deletes the given profile from the list of available profiles, closes all browsers associated with it, releases all allocated resources and files in the user data directory.

      When a profile is deleted, the cache files and preferences of the associated browsers are lost.

      Does nothing if the profile is already deleted.

      Parameters:
      profile - profile to delete
      Throws:
      IllegalArgumentException - if the profile is the default profile that cannot be deleted
      ObjectClosedException - when the engine is closed and this service is not available anymore
      See Also: