Following Java's virtual platforms, we can create our own virtual platform:
The Platform interface might include operations for creating, using, and destroying windows, threads, locks, files, etc.
Porting our application from Windows to UNIX is simply a matter of changing the peer. Of course creating an adapter will require detailed knowledge of the underlying platform.