Class StubAdapter


  • public abstract class StubAdapter
    extends java.lang.Object
    Provide access to stub delegate and type id information independent of the stub type. This class exists because ObjectImpl does not have an interface for the 3 delegate and type id methods, so a DynamicStub has a different type. We cannot simply change ObjectImpl as it is a standard API. We also cannot change the code generation of Stubs, as that is also standard. Hence I am left with this ugly class.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private StubAdapter()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Object activateServant​(Servant servant)
      Use implicit activation to get an object reference for the servant.
      static Object activateTie​(Tie tie)
      Given any Tie, return the corresponding object refernce, activating the Servant if necessary.
      static void connect​(java.lang.Object stub, ORB orb)  
      static Delegate getDelegate​(java.lang.Object stub)
      This also gets the delegate from a Servant by using Servant._this_object()
      static ORB getORB​(java.lang.Object stub)  
      static java.lang.String[] getTypeIds​(java.lang.Object stub)  
      static boolean isLocal​(java.lang.Object stub)  
      static boolean isStub​(java.lang.Object stub)  
      static boolean isStubClass​(java.lang.Class cls)  
      static OutputStream request​(java.lang.Object stub, java.lang.String operation, boolean responseExpected)  
      static void setDelegate​(java.lang.Object stub, Delegate delegate)  
      • Methods inherited from class java.lang.Object

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

      • StubAdapter

        private StubAdapter()
    • Method Detail

      • isStubClass

        public static boolean isStubClass​(java.lang.Class cls)
      • isStub

        public static boolean isStub​(java.lang.Object stub)
      • setDelegate

        public static void setDelegate​(java.lang.Object stub,
                                       Delegate delegate)
      • activateServant

        public static Object activateServant​(Servant servant)
        Use implicit activation to get an object reference for the servant.
        Parameters:
        servant - servant to activate
        Returns:
        reference to servant
      • activateTie

        public static Object activateTie​(Tie tie)
        Given any Tie, return the corresponding object refernce, activating the Servant if necessary.
        Parameters:
        tie - tie to activate
        Returns:
        reference to Tie
      • getDelegate

        public static Delegate getDelegate​(java.lang.Object stub)
        This also gets the delegate from a Servant by using Servant._this_object()
        Parameters:
        stub - stub to get delegate of
        Returns:
        the stub's Delegate
      • getORB

        public static ORB getORB​(java.lang.Object stub)
      • getTypeIds

        public static java.lang.String[] getTypeIds​(java.lang.Object stub)
      • connect

        public static void connect​(java.lang.Object stub,
                                   ORB orb)
                            throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • isLocal

        public static boolean isLocal​(java.lang.Object stub)
      • request

        public static OutputStream request​(java.lang.Object stub,
                                           java.lang.String operation,
                                           boolean responseExpected)