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 class
PresentationManagerImpl.ClassDataImpl
private static class
PresentationManagerImpl.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>
classToClassData
private boolean
debug
private PresentationManager.StubFactoryFactory
dynamicStubFactoryFactory
private org.glassfish.pfl.basic.concurrent.WeakCache<java.lang.reflect.Method,DynamicMethodMarshaller>
methodToDMM
private java.io.PrintStream
ps
private PresentationManager.StubFactoryFactory
staticStubFactoryFactory
private boolean
useDynamicStubs
private static ORBUtilSystemException
wrapper
-
Constructor Summary
Constructors Constructor Description PresentationManagerImpl(boolean useDynamicStubs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addNodes(java.util.List<java.lang.String> resultList, java.util.Set<PresentationManagerImpl.NodeImpl> nodeSet)
void
disableDebug()
void
enableDebug(java.io.PrintStream ps)
Turn on internal debugging flags, which dump information about stub code generation to the PrintStream.void
flushClass(java.lang.Class<?> cls)
Remove all internal references to Class cls from the PresentationManager.PresentationManager.ClassData
getClassData(java.lang.Class<?> cls)
Get the ClassData for a particular class.boolean
getDebug()
DynamicMethodMarshaller
getDynamicMethodMarshaller(java.lang.reflect.Method method)
Given a particular method, return a DynamicMethodMarshaller for that method.PresentationManager.StubFactoryFactory
getDynamicStubFactoryFactory()
Return the registered dynamic StubFactoryFactory.private java.lang.Class<?>[]
getInterfaces(java.util.Set<PresentationManagerImpl.NodeImpl> roots)
java.io.PrintStream
getPrintStream()
java.lang.String
getRepositoryId(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.StubFactoryFactory
getStaticStubFactoryFactory()
Return the registered static StubFactoryFactory.PresentationManager.StubFactoryFactory
getStubFactoryFactory(boolean isDynamic)
Return the registered StubFactoryFactory.Tie
getTie()
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)
void
setDynamicStubFactoryFactory(PresentationManager.StubFactoryFactory sff)
Register the static StubFactoryFactory.void
setStaticStubFactoryFactory(PresentationManager.StubFactoryFactory sff)
Register the dynamic StubFactoryFactory.boolean
useDynamicStubs()
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:PresentationManager
Given a particular method, return a DynamicMethodMarshaller for that method. This is used for dynamic stubs and ties.- Specified by:
getDynamicMethodMarshaller
in 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:PresentationManager
Get 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:
getClassData
in interfacePresentationManager
- Parameters:
cls
- iClass fro which we need ClassData.- Returns:
- The ClassData.
-
getStubFactoryFactory
public PresentationManager.StubFactoryFactory getStubFactoryFactory(boolean isDynamic)
Description copied from interface:PresentationManager
Return the registered StubFactoryFactory.- Specified by:
getStubFactoryFactory
in 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:PresentationManager
Return the registered static StubFactoryFactory.- Specified by:
getStaticStubFactoryFactory
in interfacePresentationManager
- Returns:
- static stub factory.
-
getDynamicStubFactoryFactory
public PresentationManager.StubFactoryFactory getDynamicStubFactoryFactory()
Description copied from interface:PresentationManager
Return the registered dynamic StubFactoryFactory.- Specified by:
getDynamicStubFactoryFactory
in 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:PresentationManager
Equivalent 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:
getTie
in interfacePresentationManager
- Returns:
- The static tie.
-
getRepositoryId
public java.lang.String getRepositoryId(java.rmi.Remote impl)
Description copied from interface:PresentationManager
Get the correct repository ID for the given implementation instance. This is useful when using dynamic RMI with the POA.- Specified by:
getRepositoryId
in interfacePresentationManager
- Parameters:
impl
- implementation- Returns:
- repository ID string
-
useDynamicStubs
public boolean useDynamicStubs()
Description copied from interface:PresentationManager
Returns the value of the com.sun.corba.ee.ORBUseDynamicStub property.- Specified by:
useDynamicStubs
in interfacePresentationManager
- Returns:
- whether to use dynamic stubs.
-
flushClass
public void flushClass(java.lang.Class<?> cls)
Description copied from interface:PresentationManager
Remove all internal references to Class cls from the PresentationManager. This allows ClassLoaders to be garbage collected when they are no longer needed.- Specified by:
flushClass
in 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:
getDebug
in interfacePresentationManager
-
getPrintStream
public java.io.PrintStream getPrintStream()
- Specified by:
getPrintStream
in interfacePresentationManager
-
-