Identifying a Page Containing Shortcode at `init`

I’ve found an answer, although messy.

/*
// Plugin information goes here
*/
$GLOBALS['example_class'] = new example_class;

class example_class {

    var $public_loaded = false,
        $content="";

    public function admin_init() {
        add_menu_page(
            // ...
        );
    } // End of admin_init function

    public function get_random( ) {
        // ...
    }
} // End of example class

add_action('init', function() {
    global $example_class;

    // ***** Area A
    // Check for arbitrary variable sent with every user interaction
    if ( if ( isset( sanitize_key( $_REQUEST['tni'] ) ) ) {

        // ***** Area B
        /* Set the class variable `public_loaded` to true after it's
         * clear we're loading a public page which uses our plugin */
        $example_class->public_loaded = true;

        // Sanitize and set the action role
        $action = ( isset( $_REQUEST['action'] ) ) ? sanitize_key( $_REQUEST['action'] ) : NULL;
        // Manage submitted data
        switch ( $action ) {
            // ...
        } // End of switch for action

        // Sanitize and set the view role
        $view = ( isset( $_REQUEST['view'] ) ) ? sanitize_key( $_REQUEST['ex'] ) : 'get_all';
        // Manage submitted data
        switch ( $view ) {
            // ... Generate content and store in $this->content
        } // End of switch for view
    } // End of if page is being shown
});

add_action( 'admin_menu', function() {
    global $example_class;
    $example_class->admin_init();
});

add_shortcode( 'show_public_random', function () {
    global $example_class;
    // ***** Area C
    /* Check to see if page has loaded using the telltale sign
     * If not, load a default view - a random post */
    if ( $example_class->public_loaded === false ) {
        $example_class->content = $example_class->get_random();
        // ...
    }

    // Return the generated content
    return $example_class->content;
});

In Area A I’ve set a qualifying statement to see if a user submitted a variable along with their interaction with my plugin. If the plugin is mine, the code is evaluated, and action and view modes are evaluated. As well, the function will set the class variable public_loaded to true.

In Area C I’ve set a qualifying statement to see if the class variable has been set to true; if not, a default view is set for the shortcode.