Package com.teamdev.jxbrowser.profile
Interface Profiles
- All Superinterfaces:
EngineService
A service for managing Chromium profiles.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default profile instance.void
Deletes the givenprofile
from the list of available profiles, closes all browsers associated with it, releases all allocated resources and files in the user data directory.list()
Returns an immutable list of the available profiles including the default profile.newIncognitoProfile
(String name) Creates a new incognitoProfile
instance with the givenname
.newProfile
(String name) Creates a newProfile
instance with the givenname
.Methods inherited from interface com.teamdev.jxbrowser.engine.EngineService
engine
-
Method Details
-
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
Creates a newProfile
instance with the givenname
.- Parameters:
name
- a name of the profile, cannot be empty or blank- Throws:
IllegalArgumentException
- whenname
is empty or blankObjectClosedException
- when the engine is closed and this service is not available anymore
-
newIncognitoProfile
Creates a new incognitoProfile
instance with the givenname
.- Parameters:
name
- a name of the profile. Cannot be empty or blank- Throws:
IllegalArgumentException
- whenname
is empty or blankObjectClosedException
- when the engine is closed and this service is not available anymore
-
delete
Deletes the givenprofile
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 deletedObjectClosedException
- when the engine is closed and this service is not available anymore- See Also:
-