com.sun.xml.ws.metro.api.config.management
Class ManagedEndpoint<T>

java.lang.Object
  extended by com.sun.xml.ws.api.server.WSEndpoint<T>
      extended by com.sun.xml.ws.metro.api.config.management.ManagedEndpoint<T>
Type Parameters:
T - The implementation class of the endpoint.
All Implemented Interfaces:
com.sun.xml.ws.api.Component, com.sun.xml.ws.api.ComponentRegistry, EndpointStarter

public class ManagedEndpoint<T>
extends com.sun.xml.ws.api.server.WSEndpoint<T>
implements EndpointStarter

Wraps an existing WSEndpoint instance and provides a method to swap the WSEndpoint instance. This class also brings up the management communication interfaces when it is instantiated. This class forwards all method invocations to the wrapped WSEndpoint instance.

Author:
Fabian Ritzmann

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.xml.ws.api.server.WSEndpoint
com.sun.xml.ws.api.server.WSEndpoint.CompletionCallback, com.sun.xml.ws.api.server.WSEndpoint.PipeHead
 
Field Summary
static java.lang.String CLASS_LOADER_PARAMETER_NAME
           
static java.lang.String CREATION_ATTRIBUTES_PARAMETER_NAME
           
static java.lang.String ENDPOINT_ID_PARAMETER_NAME
           
static java.lang.String ENDPOINT_INSTANCE_PARAMETER_NAME
           
static java.lang.String ENDPOINT_STARTER_PARAMETER_NAME
           
 
Constructor Summary
ManagedEndpoint(java.lang.String id, com.sun.xml.ws.api.server.WSEndpoint<T> endpoint, com.sun.xml.ws.api.config.management.EndpointCreationAttributes attributes)
          Initializes this endpoint.
 
Method Summary
 void addNotifier(ReconfigNotifier notifier)
           
 void closeManagedObjectManager()
           
 com.sun.xml.ws.api.pipe.Codec createCodec()
           
 com.sun.xml.ws.api.server.WSEndpoint.PipeHead createPipeHead()
           
 void dispose()
           
 com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext getAssemblerContext()
           
 com.sun.xml.ws.api.WSBinding getBinding()
           
 java.util.Set<com.sun.xml.ws.api.server.EndpointComponent> getComponentRegistry()
           
 com.sun.xml.ws.api.server.Container getContainer()
           
 java.lang.String getId()
          Return the ID of this managed endpoint.
 java.lang.Class<T> getImplementationClass()
           
 org.glassfish.gmbal.ManagedObjectManager getManagedObjectManager()
           
 com.sun.xml.ws.policy.PolicyMap getPolicyMap()
           
 com.sun.xml.ws.api.model.wsdl.WSDLPort getPort()
           
 javax.xml.namespace.QName getPortName()
           
 com.sun.xml.ws.api.model.SEIModel getSEIModel()
           
 com.sun.xml.ws.api.server.ServiceDefinition getServiceDefinition()
           
 javax.xml.namespace.QName getServiceName()
           
 void process(com.sun.xml.ws.api.message.Packet request, com.sun.xml.ws.api.server.WSEndpoint.CompletionCallback callback, com.sun.xml.ws.api.pipe.FiberContextSwitchInterceptor interceptor)
           
 void schedule(com.sun.xml.ws.api.message.Packet request, com.sun.xml.ws.api.server.WSEndpoint.CompletionCallback callback, com.sun.xml.ws.api.pipe.FiberContextSwitchInterceptor interceptor)
           
 void setExecutor(java.util.concurrent.Executor exec)
           
 void startEndpoint()
          Start the endpoint.
 void swapEndpointDelegate(com.sun.xml.ws.api.server.WSEndpoint<T> endpoint)
          Sets a new WSEndpoint instance to which method calls will be forwarded from then on.
 
Methods inherited from class com.sun.xml.ws.api.server.WSEndpoint
create, create, create, create, getBoundEndpoints, getComponents, getDefaultPortName, getDefaultPortName, getDefaultServiceName, getDefaultServiceName, getEngine, getSPI, schedule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENDPOINT_ID_PARAMETER_NAME

public static final java.lang.String ENDPOINT_ID_PARAMETER_NAME
See Also:
Constant Field Values

ENDPOINT_INSTANCE_PARAMETER_NAME

public static final java.lang.String ENDPOINT_INSTANCE_PARAMETER_NAME
See Also:
Constant Field Values

CREATION_ATTRIBUTES_PARAMETER_NAME

public static final java.lang.String CREATION_ATTRIBUTES_PARAMETER_NAME
See Also:
Constant Field Values

CLASS_LOADER_PARAMETER_NAME

public static final java.lang.String CLASS_LOADER_PARAMETER_NAME
See Also:
Constant Field Values

ENDPOINT_STARTER_PARAMETER_NAME

public static final java.lang.String ENDPOINT_STARTER_PARAMETER_NAME
See Also:
Constant Field Values
Constructor Detail

ManagedEndpoint

public ManagedEndpoint(java.lang.String id,
                       com.sun.xml.ws.api.server.WSEndpoint<T> endpoint,
                       com.sun.xml.ws.api.config.management.EndpointCreationAttributes attributes)
Initializes this endpoint.

Parameters:
id - A unique ID of the managed endpoint.
endpoint - The wrapped WSEndpoint instance.
attributes - Several attributes that were used to create the original WSEndpoint instance and that cannot be queried from WSEndpoint itself. This is used by the communication API to recreate WSEndpoint instances with the same parameters.
Method Detail

addNotifier

public void addNotifier(ReconfigNotifier notifier)
Parameters:
notifier - Callback object allows us to send a notification when the endpoint was reconfigured.

startEndpoint

public void startEndpoint()
Description copied from interface: EndpointStarter
Start the endpoint.

Specified by:
startEndpoint in interface EndpointStarter

getId

public java.lang.String getId()
Return the ID of this managed endpoint.

Returns:
The ID of the managed endpoint.

swapEndpointDelegate

public void swapEndpointDelegate(com.sun.xml.ws.api.server.WSEndpoint<T> endpoint)
Sets a new WSEndpoint instance to which method calls will be forwarded from then on.

Parameters:
endpoint - The WSEndpoint instance. May not be null.

dispose

public void dispose()
Specified by:
dispose in class com.sun.xml.ws.api.server.WSEndpoint<T>

createCodec

public com.sun.xml.ws.api.pipe.Codec createCodec()
Specified by:
createCodec in class com.sun.xml.ws.api.server.WSEndpoint<T>

getServiceName

public javax.xml.namespace.QName getServiceName()
Specified by:
getServiceName in class com.sun.xml.ws.api.server.WSEndpoint<T>

getPortName

public javax.xml.namespace.QName getPortName()
Specified by:
getPortName in class com.sun.xml.ws.api.server.WSEndpoint<T>

getImplementationClass

public java.lang.Class<T> getImplementationClass()
Specified by:
getImplementationClass in class com.sun.xml.ws.api.server.WSEndpoint<T>

getBinding

public com.sun.xml.ws.api.WSBinding getBinding()
Specified by:
getBinding in class com.sun.xml.ws.api.server.WSEndpoint<T>

getContainer

public com.sun.xml.ws.api.server.Container getContainer()
Specified by:
getContainer in class com.sun.xml.ws.api.server.WSEndpoint<T>

getPort

public com.sun.xml.ws.api.model.wsdl.WSDLPort getPort()
Specified by:
getPort in class com.sun.xml.ws.api.server.WSEndpoint<T>

setExecutor

public void setExecutor(java.util.concurrent.Executor exec)
Specified by:
setExecutor in class com.sun.xml.ws.api.server.WSEndpoint<T>

schedule

public void schedule(com.sun.xml.ws.api.message.Packet request,
                     com.sun.xml.ws.api.server.WSEndpoint.CompletionCallback callback,
                     com.sun.xml.ws.api.pipe.FiberContextSwitchInterceptor interceptor)
Specified by:
schedule in class com.sun.xml.ws.api.server.WSEndpoint<T>

process

public void process(com.sun.xml.ws.api.message.Packet request,
                    com.sun.xml.ws.api.server.WSEndpoint.CompletionCallback callback,
                    com.sun.xml.ws.api.pipe.FiberContextSwitchInterceptor interceptor)
Overrides:
process in class com.sun.xml.ws.api.server.WSEndpoint<T>

createPipeHead

public com.sun.xml.ws.api.server.WSEndpoint.PipeHead createPipeHead()
Specified by:
createPipeHead in class com.sun.xml.ws.api.server.WSEndpoint<T>

getServiceDefinition

public com.sun.xml.ws.api.server.ServiceDefinition getServiceDefinition()
Specified by:
getServiceDefinition in class com.sun.xml.ws.api.server.WSEndpoint<T>

getComponentRegistry

public java.util.Set<com.sun.xml.ws.api.server.EndpointComponent> getComponentRegistry()
Specified by:
getComponentRegistry in class com.sun.xml.ws.api.server.WSEndpoint<T>

getSEIModel

public com.sun.xml.ws.api.model.SEIModel getSEIModel()
Specified by:
getSEIModel in class com.sun.xml.ws.api.server.WSEndpoint<T>

getPolicyMap

public com.sun.xml.ws.policy.PolicyMap getPolicyMap()
Specified by:
getPolicyMap in class com.sun.xml.ws.api.server.WSEndpoint<T>

getManagedObjectManager

public org.glassfish.gmbal.ManagedObjectManager getManagedObjectManager()
Specified by:
getManagedObjectManager in class com.sun.xml.ws.api.server.WSEndpoint<T>

closeManagedObjectManager

public void closeManagedObjectManager()
Specified by:
closeManagedObjectManager in class com.sun.xml.ws.api.server.WSEndpoint<T>

getAssemblerContext

public com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext getAssemblerContext()
Specified by:
getAssemblerContext in class com.sun.xml.ws.api.server.WSEndpoint<T>


Copyright © 2005-2013 Oracle Corporation. All Rights Reserved.