Class P2Session


  • public class P2Session
    extends java.lang.Object
    In-memory store of all p2 metadata, especially provides/requires dependency information.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  P2Session.Requirement
      Keeps track of every unit which provides the given capability.
    • Constructor Summary

      Constructors 
      Constructor Description
      P2Session()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      P2Unit getUnitById​(java.lang.String id)
      Returns the unit with the given id.
      void populateFrom​(P2Client client, java.lang.String url)
      Adds every P2Unit from the given url into this session.
      P2Query query()
      Creates a new P2Query against this session.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • P2Session

        public P2Session()
    • Method Detail

      • populateFrom

        public void populateFrom​(P2Client client,
                                 java.lang.String url)
                          throws java.lang.Exception
        Adds every P2Unit from the given url into this session.
        Throws:
        java.lang.Exception
      • getUnitById

        public P2Unit getUnitById​(java.lang.String id)
        Returns the unit with the given id. If there are multiple units with the same id, returns the one with the greatest version number. If there are none, throws an exception.
      • query

        public P2Query query()
        Creates a new P2Query against this session.