|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.api.server.WSEndpoint
com.sun.xml.ws.server.WSEndpointMOMProxy
public class WSEndpointMOMProxy
ManagedObjectManager proxy class for WSEndpointImpl instances that could be used when Gmbal API calls
need to be deferred. The proxy tries to defer a need of a real ManagedObjectManager instance to the time when any
method from ManagedObjectManager is invoked on it. In this case a real instance of ManagedObjectManager is
obtained from WSEndpointImpl and the method is rather invoked on this object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.xml.ws.api.server.WSEndpoint |
|---|
WSEndpoint.CompletionCallback, WSEndpoint.PipeHead |
| Nested classes/interfaces inherited from interface org.glassfish.gmbal.ManagedObjectManager |
|---|
ManagedObjectManager.RegistrationDebugLevel |
| Method Summary | |
|---|---|
void |
addAnnotation(AnnotatedElement element,
Annotation annotation)
Method to add an annotation to an element that cannot be modified. |
void |
close()
|
void |
closeManagedObjectManager()
Close the ManagedObjectManager for this endpoint. |
Codec |
createCodec()
Gets the Endpoint's codec that is used to encode/decode Messages. |
WSEndpoint.PipeHead |
createPipeHead()
Creates a new WSEndpoint.PipeHead to process
incoming requests. |
GmbalMBean |
createRoot()
Create a default root MBean. |
GmbalMBean |
createRoot(Object root)
Create a root MBean from root, which much have a method with the |
GmbalMBean |
createRoot(Object root,
String name)
Create a root MBean from root with the given name. |
Packet |
createServiceResponseForException(ThrowableContainerPropertySet tc,
Packet responsePacket,
SOAPVersion soapVersion,
WSDLPort wsdlPort,
SEIModel seiModel,
WSBinding binding)
This is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception. |
void |
dispose()
Indicates that the WSEndpoint is about to be turned off,
and will no longer serve any packet anymore. |
String |
dumpSkeleton(Object obj)
Dump the skeleton used in the implementation of the MBean for obj. |
boolean |
equalsProxiedInstance(WSEndpoint endpoint)
Used for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints. |
AMXClient |
getAMXClient(Object obj)
Get an AMXClient instance for the object obj, if obj is registered as an MBean in this mom. |
ServerTubeAssemblerContext |
getAssemblerContext()
This is only needed to expose info for monitoring. |
WSBinding |
getBinding()
Represents the binding for which this WSEndpoint
is created for. |
Set |
getComponentRegistry()
Gets the list of EndpointComponent that are associated
with this endpoint. |
Container |
getContainer()
Gets the Container object. |
String |
getDomain()
Return the domain name that was used when this ManagedObjectManager was created. |
EndpointReference |
getEndpointReference(Class clazz,
String address,
String wsdlAddress,
Element... referenceParameters)
Return EndpointReference instance, based on passed parameters and spec version represented by clazz |
EndpointReference |
getEndpointReference(Class clazz,
String address,
String wsdlAddress,
List metadata,
List referenceParameters)
|
Class |
getImplementationClass()
Gets the application endpoint Class that eventually serves the request. |
ManagedObjectManager |
getManagedObjectManager()
Returns a real instance of ManagedObjectManager |
MBeanServer |
getMBeanServer()
Get the current MBeanServer. |
Object |
getObject(ObjectName oname)
Get the Object that was registered with the given ObjectName. |
ObjectName |
getObjectName(Object obj)
Get the ObjectName for the given object (which must have been registered via a register call). |
OperationDispatcher |
getOperationDispatcher()
Nullable when there is no associated WSDL Model |
PolicyMap |
getPolicyMap()
Gives the PolicMap that captures the Policy for the endpoint |
WSDLPort |
getPort()
Gets the port that this endpoint is serving. |
QName |
getPortName()
Gets the application endpoint's portName. |
ResourceBundle |
getResourceBundle()
Get the resource bundle (if any) set by setResourceBundle. |
Object |
getRoot()
Return the root of this ManagedObjectManager. |
SEIModel |
getSEIModel()
Gets the SEIModel that represents the relationship
between WSDL and Java SEI. |
ServiceDefinition |
getServiceDefinition()
Gets the description of the service. |
QName |
getServiceName()
Gets the application endpoint's serviceName. |
WSEndpointImpl |
getWsEndpoint()
|
boolean |
isInitialized()
Returns true if this proxy contains a reference to real ManagedObjectManager instance, false
otherwise. |
boolean |
isManagedObject(Object obj)
Return true if object is assignment compatible with a class or interface that has an @ManagedObject annotation, otherwise false. |
GmbalMBean |
register(Object parent,
Object obj)
Same as register( parent, obj, name ), but here the name is derived from an @NameValue annotation. |
GmbalMBean |
register(Object parent,
Object obj,
String name)
Construct an Open Mean for obj according to its annotations, and register it with domain getDomain() and the appropriate ObjectName. |
GmbalMBean |
registerAtRoot(Object obj)
Same as registerAtRoot( Object, String ), but here the name is derived from an @ObjectKeyName annotation. |
GmbalMBean |
registerAtRoot(Object obj,
String name)
Registers the MBean for obj at the root MBean for the ObjectManager, using the given name. |
void |
resumeJMXRegistration()
Decrements the suspend counter, if the counter is greater than 0. |
void |
schedule(Packet request,
WSEndpoint.CompletionCallback callback,
FiberContextSwitchInterceptor interceptor)
Schedule invocation of web service asynchronously. |
void |
setExecutor(Executor exec)
Set this Executor to run asynchronous requests using this executor. |
void |
setJMXRegistrationDebug(boolean flag)
Set debugging for JMX registrations. |
void |
setMBeanServer(MBeanServer server)
Set the MBeanServer to which all MBeans using this interface are published. |
void |
setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel level)
Print debug output to System.out. |
void |
setResourceBundle(ResourceBundle rb)
Set the ResourceBundle to use for getting localized descriptions. |
void |
setRuntimeDebug(boolean flag)
Enable generation of debug log at INFO level for runtime MBean operations to the org.glassfish.gmbal.impl logger. |
void |
setTypelibDebug(int level)
Enabled generation of debug log for type evaluator debugging. |
void |
stripPackagePrefix()
Change the default type name algorithm so that if nothing else applies, the entire package prefix is stripped form the Class name. |
void |
stripPrefix(String... str)
Add a type prefix to strip from type names, to shorten the names for a better presentation to the user. |
void |
suppressDuplicateRootReport(boolean suppressReport)
Suppress reporting of a duplicate root name. |
void |
suspendJMXRegistration()
If called, no MBeans created after this call will be registered with the JMX MBeanServer until resumeJMXRegistration is called. |
void |
unregister(Object obj)
Unregister the Open MBean corresponding to obj from the mbean server. |
| Methods inherited from class com.sun.xml.ws.api.server.WSEndpoint |
|---|
create, create, create, create, getBoundEndpoints, getComponents, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultPortName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getDefaultServiceName, getEngine, getSPI, process, schedule |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ManagedObjectManager getManagedObjectManager()
ManagedObjectManager
getManagedObjectManager in class WSEndpointpublic boolean isInitialized()
true if this proxy contains a reference to real ManagedObjectManager instance, false
otherwise.
true if ManagedObjectManager has been created, false otherwise.public WSEndpointImpl getWsEndpoint()
public void suspendJMXRegistration()
ManagedObjectManager
suspendJMXRegistration in interface ManagedObjectManagerpublic void resumeJMXRegistration()
ManagedObjectManager
resumeJMXRegistration in interface ManagedObjectManagerpublic boolean isManagedObject(Object obj)
ManagedObjectManager
isManagedObject in interface ManagedObjectManagerpublic GmbalMBean createRoot()
ManagedObjectManager
createRoot in interface ManagedObjectManagerpublic GmbalMBean createRoot(Object root)
ManagedObjectManager
createRoot in interface ManagedObjectManagerroot - The Java object to be used to construct the root.
public GmbalMBean createRoot(Object root,
String name)
ManagedObjectManager
createRoot in interface ManagedObjectManagerroot - The Java object to be used to construct the root.name - The ObjectName name field to be used in the ObjectName of
the MBean constructed from root.
public Object getRoot()
ManagedObjectManager
getRoot in interface ManagedObjectManager
public GmbalMBean register(Object parent,
Object obj,
String name)
ManagedObjectManagerThe MBeanInfo for the result is actually ModelMBeanInfo, and may contain extra metadata as defined using annotations defined with the
register in interface ManagedObjectManagerparent - The parent object that contains obj.obj - The managed object we are registering.name - The name to use for registering this object.
public GmbalMBean register(Object parent,
Object obj)
ManagedObjectManagerThis version of register should also be used to register singletons.
register in interface ManagedObjectManagerparent - The parent object that contains obj.obj - The managed object we are registering.
public GmbalMBean registerAtRoot(Object obj,
String name)
ManagedObjectManagerMust be called after a successful createRoot call.
This version of register should not be used to register singletons.
registerAtRoot in interface ManagedObjectManagerobj - The object for which we construct and register an MBean.name - The name of the MBean.
public GmbalMBean registerAtRoot(Object obj)
ManagedObjectManagerThis version of register should also be used to register singletons.
registerAtRoot in interface ManagedObjectManagerobj - The managed object we are registering.
public void unregister(Object obj)
ManagedObjectManagerMust be called after a successful createRoot call.
unregister in interface ManagedObjectManagerobj - The object originally passed to a register method.public ObjectName getObjectName(Object obj)
ManagedObjectManagerMust be called after a successful createRoot call.
getObjectName in interface ManagedObjectManagerobj - The object originally passed to a register call.
public AMXClient getAMXClient(Object obj)
ManagedObjectManagerMust be called after a successful createRoot call.
getAMXClient in interface ManagedObjectManagerobj - The object corresponding to an MBean.
public Object getObject(ObjectName oname)
ManagedObjectManagerMust be called after a successful createRoot call.
getObject in interface ManagedObjectManageroname - The ObjectName used to register the object.
public void stripPrefix(String... str)
ManagedObjectManager
stripPrefix in interface ManagedObjectManagerstr - Class package name to strip from type name.public void stripPackagePrefix()
ManagedObjectManager
stripPackagePrefix in interface ManagedObjectManagerpublic String getDomain()
ManagedObjectManagerMay be called at any time.
getDomain in interface ManagedObjectManagerpublic void setMBeanServer(MBeanServer server)
ManagedObjectManagerMust be called before a successful createRoot call.
setMBeanServer in interface ManagedObjectManagerserver - The MBeanServer to set as the MBeanServer for this
ManagedObjectManager.public MBeanServer getMBeanServer()
ManagedObjectManagerMay be called at any time.
getMBeanServer in interface ManagedObjectManagerpublic void setResourceBundle(ResourceBundle rb)
ManagedObjectManagerMust be called before a successful call to a createRoot method.
setResourceBundle in interface ManagedObjectManagerrb - The resource bundle to use. May be null.public ResourceBundle getResourceBundle()
ManagedObjectManagerMay be called at any time.
getResourceBundle in interface ManagedObjectManager
public void addAnnotation(AnnotatedElement element,
Annotation annotation)
ManagedObjectManager
addAnnotation in interface ManagedObjectManagerelement - The annotated element (class or method for our purposes).annotation - The annotation we wish to add to the element.public void setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel level)
ManagedObjectManagerMay be called at any time.
setRegistrationDebug in interface ManagedObjectManagerlevel - NONE is no debugging at all, NORMAL traces high-level
construction of skeletons and type converters, and dumps results of new
skeletons and type converters, FINE traces everything in great detail.
The tracing is done with INFO-level logger calls. The logger name is
that package name (org.glassfish.gmbal.impl).public void setRuntimeDebug(boolean flag)
ManagedObjectManagerMay be called at any time.
setRuntimeDebug in interface ManagedObjectManagerflag - true to enable runtime debug, false to disable.public void setTypelibDebug(int level)
ManagedObjectManagerMay be called at any time.
setTypelibDebug in interface ManagedObjectManagerlevel - set to 1 to just see the results of the TypeEvaluator, >1 to
see lots of details. WARNING: values >1 will result in a large amount
of output.public void setJMXRegistrationDebug(boolean flag)
ManagedObjectManager
setJMXRegistrationDebug in interface ManagedObjectManagerflag - True to enalbed registration tracing.public String dumpSkeleton(Object obj)
ManagedObjectManagerMust be called after a successful call to a createRoot method.
dumpSkeleton in interface ManagedObjectManagerobj - The registered object whose skeleton should be displayed.
public void suppressDuplicateRootReport(boolean suppressReport)
ManagedObjectManagerMust be called before a successful call to a createRoot method.
suppressDuplicateRootReport in interface ManagedObjectManager
public void close()
throws IOException
close in interface CloseableIOExceptionpublic boolean equalsProxiedInstance(WSEndpoint endpoint)
WSEndpoint
equalsProxiedInstance in class WSEndpointpublic Codec createCodec()
WSEndpointMessages. This is a
copy of the master codec and it shouldn't be shared across two requests running
concurrently(unless it is stateless).
createCodec in class WSEndpointpublic QName getServiceName()
WSEndpoint
getServiceName in class WSEndpointpublic QName getPortName()
WSEndpoint
getPortName in class WSEndpointpublic Class getImplementationClass()
WSEndpointClass that eventually serves the request.
This is the same value given to the WSEndpoint.create(java.lang.Class method.
getImplementationClass in class WSEndpointpublic WSBinding getBinding()
WSEndpointWSEndpoint
is created for.
getBinding in class WSEndpointpublic Container getContainer()
WSEndpointContainer object.
The components inside WSEndpoint uses this reference
to communicate with the hosting environment.
getContainer in class WSEndpointContainer instance
is given, Container.NONE will be returned.public WSDLPort getPort()
WSEndpoint
A service is not required to have a WSDL, and when it doesn't,
this method returns null. Otherwise it returns an object that
describes the port that this WSEndpoint is serving.
getPort in class WSEndpointpublic void setExecutor(Executor exec)
WSEndpointExecutor to run asynchronous requests using this executor.
This executor is set on Engine and must be set before
calling WSEndpoint.schedule(Packet,CompletionCallback) and
WSEndpoint.schedule(Packet,CompletionCallback,FiberContextSwitchInterceptor) methods.
setExecutor in class WSEndpointexec - Executor to run async requests
public void schedule(Packet request,
WSEndpoint.CompletionCallback callback,
FiberContextSwitchInterceptor interceptor)
WSEndpoint
schedule in class WSEndpointrequest - web service requestcallback - callback to get response packet(exception if there is one)interceptor - caller's interceptor to impose a context of executionWSEndpoint.schedule(Packet, CompletionCallback)public WSEndpoint.PipeHead createPipeHead()
WSEndpointWSEndpoint.PipeHead to process
incoming requests.
This is not a cheap operation. The caller is expected
to reuse the returned WSEndpoint.PipeHead. See
class javadoc for details.
createPipeHead in class WSEndpointWSEndpoint.PipeHead that's ready to serve.public void dispose()
WSEndpointWSEndpoint is about to be turned off,
and will no longer serve any packet anymore.
This method needs to be invoked for the JAX-WS RI to correctly
implement some of the spec semantics (TODO: pointer.)
It's the responsibility of the code that hosts a WSEndpoint
to invoke this method.
Once this method is called, the behavior is undefed for
all in-progress WSEndpoint.PipeHead.process(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.api.server.WebServiceContextDelegate, com.sun.xml.ws.api.server.TransportBackChannel) methods (by other threads)
and future WSEndpoint.PipeHead.process(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.api.server.WebServiceContextDelegate, com.sun.xml.ws.api.server.TransportBackChannel) method invocations.
dispose in class WSEndpointpublic ServiceDefinition getServiceDefinition()
WSEndpointA description is a set of WSDL/schema and other documents that together describes a service. A service is not required to have a description, and when it doesn't, this method returns null.
getServiceDefinition in class WSEndpointpublic Set getComponentRegistry()
WSEndpointEndpointComponent that are associated
with this endpoint.
Components (such as codec, tube, handler, etc) who wish to provide
some service to other components in the endpoint can iterate the
registry and call its EndpointComponent.getSPI(Class) to
establish a private contract between components.
Components who wish to subscribe to such a service can add itself to this set.
getComponentRegistry in class WSEndpointpublic SEIModel getSEIModel()
WSEndpointSEIModel that represents the relationship
between WSDL and Java SEI.
This method returns a non-null value if and only if this endpoint is ultimately serving an application through an SEI.
getSEIModel in class WSEndpointpublic PolicyMap getPolicyMap()
WSEndpoint
getPolicyMap in class WSEndpointpublic void closeManagedObjectManager()
WSEndpoint
closeManagedObjectManager in class WSEndpointpublic ServerTubeAssemblerContext getAssemblerContext()
WSEndpoint
getAssemblerContext in class WSEndpoint
public EndpointReference getEndpointReference(Class clazz,
String address,
String wsdlAddress,
Element... referenceParameters)
WSEndpoint
getEndpointReference in class WSEndpointclazz - represents spec versionaddress - endpoint addresswsdlAddress - wsdl addressreferenceParameters - any reference parameters to be added to the instance
public EndpointReference getEndpointReference(Class clazz,
String address,
String wsdlAddress,
List metadata,
List referenceParameters)
getEndpointReference in class WSEndpointpublic OperationDispatcher getOperationDispatcher()
WSEndpoint
getOperationDispatcher in class WSEndpoint
public Packet createServiceResponseForException(ThrowableContainerPropertySet tc,
Packet responsePacket,
SOAPVersion soapVersion,
WSDLPort wsdlPort,
SEIModel seiModel,
WSBinding binding)
WSEndpoint
createServiceResponseForException in class WSEndpoint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||