Class StubAdapter

java.lang.Object
com.sun.corba.ee.spi.presentation.rmi.StubAdapter

public abstract class StubAdapter extends 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.
  • Field Details

  • Constructor Details

    • StubAdapter

      private StubAdapter()
  • Method Details

    • isStubClass

      public static boolean isStubClass(Class cls)
    • isStub

      public static boolean isStub(Object stub)
    • setDelegate

      public static void setDelegate(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(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(Object stub)
    • getTypeIds

      public static String[] getTypeIds(Object stub)
    • connect

      public static void connect(Object stub, ORB orb) throws RemoteException
      Throws:
      RemoteException
    • isLocal

      public static boolean isLocal(Object stub)
    • request

      public static OutputStream request(Object stub, String operation, boolean responseExpected)