Class PresentationManagerImpl
- java.lang.Object
-
- com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl
-
- All Implemented Interfaces:
PresentationManager
public final class PresentationManagerImpl extends java.lang.Object implements PresentationManager
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classPresentationManagerImpl.ClassDataImplprivate static classPresentationManagerImpl.NodeImpl-
Nested classes/interfaces inherited from interface com.sun.corba.ee.spi.presentation.rmi.PresentationManager
PresentationManager.ClassData, PresentationManager.StubFactory, PresentationManager.StubFactoryFactory
-
-
Field Summary
Fields Modifier and Type Field Description private org.glassfish.pfl.basic.concurrent.WeakCache<java.lang.Class<?>,PresentationManager.ClassData>classToClassDataprivate booleandebugprivate PresentationManager.StubFactoryFactorydynamicStubFactoryFactoryprivate org.glassfish.pfl.basic.concurrent.WeakCache<java.lang.reflect.Method,DynamicMethodMarshaller>methodToDMMprivate java.io.PrintStreampsprivate PresentationManager.StubFactoryFactorystaticStubFactoryFactoryprivate booleanuseDynamicStubsprivate static ORBUtilSystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description PresentationManagerImpl(boolean useDynamicStubs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddNodes(java.util.List<java.lang.String> resultList, java.util.Set<PresentationManagerImpl.NodeImpl> nodeSet)voiddisableDebug()voidenableDebug(java.io.PrintStream ps)Turn on internal debugging flags, which dump information about stub code generation to the PrintStream.voidflushClass(java.lang.Class<?> cls)Remove all internal references to Class cls from the PresentationManager.PresentationManager.ClassDatagetClassData(java.lang.Class<?> cls)Get the ClassData for a particular class.booleangetDebug()DynamicMethodMarshallergetDynamicMethodMarshaller(java.lang.reflect.Method method)Given a particular method, return a DynamicMethodMarshaller for that method.PresentationManager.StubFactoryFactorygetDynamicStubFactoryFactory()Return the registered dynamic StubFactoryFactory.private java.lang.Class<?>[]getInterfaces(java.util.Set<PresentationManagerImpl.NodeImpl> roots)java.io.PrintStreamgetPrintStream()java.lang.StringgetRepositoryId(java.rmi.Remote impl)Get the correct repository ID for the given implementation instance.private java.util.Set<PresentationManagerImpl.NodeImpl>getRootSet(java.lang.Class<?> target, PresentationManagerImpl.NodeImpl root, org.glassfish.pfl.basic.graph.Graph<PresentationManagerImpl.NodeImpl> gr)PresentationManager.StubFactoryFactorygetStaticStubFactoryFactory()Return the registered static StubFactoryFactory.PresentationManager.StubFactoryFactorygetStubFactoryFactory(boolean isDynamic)Return the registered StubFactoryFactory.TiegetTie()Equivalent to getStubFactoryFactory( true ).getTie( null ).private java.lang.String[]makeTypeIds(PresentationManagerImpl.NodeImpl root, org.glassfish.pfl.basic.graph.Graph<PresentationManagerImpl.NodeImpl> gr, java.util.Set<PresentationManagerImpl.NodeImpl> rootSet)voidsetDynamicStubFactoryFactory(PresentationManager.StubFactoryFactory sff)Register the static StubFactoryFactory.voidsetStaticStubFactoryFactory(PresentationManager.StubFactoryFactory sff)Register the dynamic StubFactoryFactory.booleanuseDynamicStubs()Returns the value of the com.sun.corba.ee.ORBUseDynamicStub property.
-
-
-
Field Detail
-
wrapper
private static final ORBUtilSystemException wrapper
-
classToClassData
private org.glassfish.pfl.basic.concurrent.WeakCache<java.lang.Class<?>,PresentationManager.ClassData> classToClassData
-
methodToDMM
private org.glassfish.pfl.basic.concurrent.WeakCache<java.lang.reflect.Method,DynamicMethodMarshaller> methodToDMM
-
staticStubFactoryFactory
private PresentationManager.StubFactoryFactory staticStubFactoryFactory
-
dynamicStubFactoryFactory
private PresentationManager.StubFactoryFactory dynamicStubFactoryFactory
-
useDynamicStubs
private boolean useDynamicStubs
-
debug
private boolean debug
-
ps
private java.io.PrintStream ps
-
-
Method Detail
-
getDynamicMethodMarshaller
public DynamicMethodMarshaller getDynamicMethodMarshaller(java.lang.reflect.Method method)
Description copied from interface:PresentationManagerGiven a particular method, return a DynamicMethodMarshaller for that method. This is used for dynamic stubs and ties.- Specified by:
getDynamicMethodMarshallerin interfacePresentationManager- Parameters:
method- Method for which we need a DynamicMethodMarshaller.- Returns:
- The DynamicMethodMarshaller.
-
getClassData
public PresentationManager.ClassData getClassData(java.lang.Class<?> cls)
Description copied from interface:PresentationManagerGet the ClassData for a particular class. This class may be an implementation class, in which case the IDLNameTranslator handles all Remote interfaces implemented by the class. If the class implements more than one remote interface, and not all of the remote interfaces are related by inheritance, then the type IDs have the implementation class as element 0.- Specified by:
getClassDatain interfacePresentationManager- Parameters:
cls- iClass fro which we need ClassData.- Returns:
- The ClassData.
-
getStubFactoryFactory
public PresentationManager.StubFactoryFactory getStubFactoryFactory(boolean isDynamic)
Description copied from interface:PresentationManagerReturn the registered StubFactoryFactory.- Specified by:
getStubFactoryFactoryin interfacePresentationManager- Parameters:
isDynamic- true iff we want the dynamic stub factory- Returns:
- static or dynamic stub factory.
-
getStaticStubFactoryFactory
public PresentationManager.StubFactoryFactory getStaticStubFactoryFactory()
Description copied from interface:PresentationManagerReturn the registered static StubFactoryFactory.- Specified by:
getStaticStubFactoryFactoryin interfacePresentationManager- Returns:
- static stub factory.
-
getDynamicStubFactoryFactory
public PresentationManager.StubFactoryFactory getDynamicStubFactoryFactory()
Description copied from interface:PresentationManagerReturn the registered dynamic StubFactoryFactory.- Specified by:
getDynamicStubFactoryFactoryin interfacePresentationManager- Returns:
- dynamic stub factory.
-
setStaticStubFactoryFactory
public void setStaticStubFactoryFactory(PresentationManager.StubFactoryFactory sff)
Register the dynamic StubFactoryFactory. Note that a dynamic StubFactoryFactory is optional.- Parameters:
sff- Factory to register
-
setDynamicStubFactoryFactory
public void setDynamicStubFactoryFactory(PresentationManager.StubFactoryFactory sff)
Register the static StubFactoryFactory. Note that a static StubFactoryFactory is always required for IDL.- Parameters:
sff- Factory to Register
-
getTie
public Tie getTie()
Description copied from interface:PresentationManagerEquivalent to getStubFactoryFactory( true ).getTie( null ). Provided for compatibility with earlier versions of PresentationManager as used in the app server. The class argument is ignored in the dynamic case, so this is safe.- Specified by:
getTiein interfacePresentationManager- Returns:
- The static tie.
-
getRepositoryId
public java.lang.String getRepositoryId(java.rmi.Remote impl)
Description copied from interface:PresentationManagerGet the correct repository ID for the given implementation instance. This is useful when using dynamic RMI with the POA.- Specified by:
getRepositoryIdin interfacePresentationManager- Parameters:
impl- implementation- Returns:
- repository ID string
-
useDynamicStubs
public boolean useDynamicStubs()
Description copied from interface:PresentationManagerReturns the value of the com.sun.corba.ee.ORBUseDynamicStub property.- Specified by:
useDynamicStubsin interfacePresentationManager- Returns:
- whether to use dynamic stubs.
-
flushClass
public void flushClass(java.lang.Class<?> cls)
Description copied from interface:PresentationManagerRemove all internal references to Class cls from the PresentationManager. This allows ClassLoaders to be garbage collected when they are no longer needed.- Specified by:
flushClassin interfacePresentationManager- Parameters:
cls- Class to flush
-
getRootSet
private java.util.Set<PresentationManagerImpl.NodeImpl> getRootSet(java.lang.Class<?> target, PresentationManagerImpl.NodeImpl root, org.glassfish.pfl.basic.graph.Graph<PresentationManagerImpl.NodeImpl> gr)
-
getInterfaces
private java.lang.Class<?>[] getInterfaces(java.util.Set<PresentationManagerImpl.NodeImpl> roots)
-
makeTypeIds
private java.lang.String[] makeTypeIds(PresentationManagerImpl.NodeImpl root, org.glassfish.pfl.basic.graph.Graph<PresentationManagerImpl.NodeImpl> gr, java.util.Set<PresentationManagerImpl.NodeImpl> rootSet)
-
addNodes
private void addNodes(java.util.List<java.lang.String> resultList, java.util.Set<PresentationManagerImpl.NodeImpl> nodeSet)
-
enableDebug
public void enableDebug(java.io.PrintStream ps)
Turn on internal debugging flags, which dump information about stub code generation to the PrintStream.- Parameters:
ps- Output stream.
-
disableDebug
public void disableDebug()
-
getDebug
public boolean getDebug()
- Specified by:
getDebugin interfacePresentationManager
-
getPrintStream
public java.io.PrintStream getPrintStream()
- Specified by:
getPrintStreamin interfacePresentationManager
-
-