Whitman uses a central extended metaphor in which the spider in the poem represents the speaker's soul.
Whitman's poem relies on a central interconnected analogy that links the speaker's psyche to an external symbol, namely the spider.