This sounds like a very interesting and educating project!
Sadly, what you want to do is probably not as easy as you would like. USB is a complex protocol, and not as high-level as network sockets. Java does not support it very well, and while you could write a minimal custom driver and interface to that through java, it would be easier just scrapping the java part altogether.
Have a look here for how to use Pi Zero as a device: Can the Pi Zero act as an USB peripheral device?
Or add networking to your pi zero: What's the cheapest way to get network connectivity to the Pi Zero?
If you want to make a "device" out of the pi, you want to make what in linux-lingo is called a "gadget driver". (The device driver is on the host machine, talking to the device. The gadget driver is the sw on the device that the device driver talks to.)
To write a gadget driver, start out at http://www.linux-usb.org/gadget/. It seems ADA Fruit has a tutorial about how to make a serial or an ethernet gadget: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/overview
You would want to go on, to create a custom type of gadget, with a custom device driver, that loads when your gadget is detected. From there, you could do an interrupt type USB-channel, that tells the host system when there has been an event on the gadget.
So, on the pi zero, you would build a gadget driver, and on the host you would make a device driver.
If you want to go ahead with this, you should have a look at the horse book.