Top Description Inners Fields Constructors Methods
sun.awt.screencast

pack-priv final Class TokenStorage

extends Object
Class Inheritance
Imports
java.awt.Dimension, .Rectangle, java.io.BufferedReader, .BufferedWriter, .IOException, java.nio.file.FileSystems, .Files, .Path, .WatchEvent, .WatchKey, .WatchService, java.nio.file.attribute.PosixFilePermission, java.util.Arrays, .HashSet, .LinkedHashSet, .List, .Objects, .Properties, .Set

Helper class for persistent storage of ScreenCast restore tokens and associated screen boundaries. The restore token allows the ScreenCast session to be restored with previously granted screen access permissions.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Path
private static final Properties
private static final Path
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static Set<TokenItem>
getTokens(List<Rectangle> affectedScreenBounds)

private static boolean
private static boolean
private static void
removeMalformedRecords(Set<String> malformedRecords)

private static boolean
private static Path
private static void
private static void
store(String failMsg)

private static void
storeTokenFromNative(String oldToken, String newToken, int[] allowedScreenBounds)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

PROP_FILENAMEback to summary
private static final Path PROP_FILENAME
PROPSback to summary
private static final Properties PROPS
PROPS_PATHback to summary
private static final Path PROPS_PATH
REL_NAMEback to summary
private static final String REL_NAME

Constructor Detail

TokenStorageback to summary
private TokenStorage()

Method Detail

getTokensback to summary
pack-priv static Set<TokenItem> getTokens(List<Rectangle> affectedScreenBounds)
isWritableback to summary
private static boolean isWritable()
readTokensback to summary
private static boolean readTokens(Path path)
removeMalformedRecordsback to summary
private static void removeMalformedRecords(Set<String> malformedRecords)
setFilePermissionback to summary
private static boolean setFilePermission(Path path)
setupPathback to summary
private static Path setupPath()
setupWatchback to summary
private static void setupWatch()
storeback to summary
private static void store(String failMsg)
storeTokenFromNativeback to summary
private static void storeTokenFromNative(String oldToken, String newToken, int[] allowedScreenBounds)
sun.awt.screencast back to summary

private Class TokenStorage.WatcherThread

extends Thread
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final WatchService
Inherited from java.lang.Thread:
MAX_PRIORITYMIN_PRIORITYNORM_PRIORITY

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

This method is run by the thread when it executes.
Inherited from java.lang.Thread:
activeCountcheckAccessclonecurrentThreaddumpStackenumerategetAllStackTracesgetContextClassLoadergetDefaultUncaughtExceptionHandlergetIdgetNamegetPrioritygetStackTracegetStategetThreadGroupgetUncaughtExceptionHandlerholdsLockinterruptinterruptedisAliveisDaemonisInterruptedisVirtualjoinjoinjoinjoinofPlatformofVirtualonSpinWaitresumesetContextClassLoadersetDaemonsetDefaultUncaughtExceptionHandlersetNamesetPrioritysetUncaughtExceptionHandlersleepsleepsleepstartstartVirtualThreadstopsuspendthreadIdtoStringyield

Field Detail

watcherback to summary
private final WatchService watcher

Constructor Detail

WatcherThreadback to summary
public WatcherThread(WatchService watchService)

Method Detail

runback to summary
public void run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

Doc from java.lang.Thread.run.

This method is run by the thread when it executes. Subclasses of Thread may override this method.

This method is not intended to be invoked directly. If this thread is a platform thread created with a Runnable task then invoking this method will invoke the task's run method. If this thread is a virtual thread then invoking this method directly does nothing.

Annotations
@Override