Using GeoTools with mapnik (coordinations vs. OSM IDs)

I want route a road on OSM from Node A to Node B (OSM node IDs are given).
I will use the GeoTools DijkstraShortestPathFinder.

After finding the route I will generate for our web site with mapnik images.

The problem is DijkstraShortestPathFinder works with nodes on base of coordinates. Mapnik only understands OSM IDs (in this case way IDs).
Can DijkstraShortestPathFinder work with OSM IDs too???

In Geotools Demoprojekt Quickstart I see on unsing button ‘Identify Features’ the OSM ID on current geo position.
It seems possible in GeoTools map OSM-ID <—> coordinates. How does it work?

Thank you! Regards!