/** * Initializes this provider with a given scope. If the given scope is different than the one this provider is * currently in and the transition between scopes is valid then a event is fired to all registered listeners. * * @param scope a scope to initialize this provider with */ public void initMOMForScope(LazyMOMProvider.Scope scope) { // cannot go backwards between scopes, for possible scope changes see #Scope if ((this.scope == Scope.GLASSFISH_JMX) || (scope == Scope.STANDALONE && (this.scope == Scope.GLASSFISH_JMX || this.scope == Scope.GLASSFISH_NO_JMX)) || this.scope == scope) { return; } this.scope = scope; fireScopeChanged(); }
/** * Registers the given object as a listener. * * @param listener a listener to be registered */ public void registerListener(DefaultScopeChangeListener listener) { listeners.add(listener); if (!isProviderInDefaultScope()) { listener.scopeChanged(this.scope); } }
/** * Initializes this listener. Currently this means that listener is registering itself at {@link LazyMOMProvider}. */ public void initialize() { // register this listener at provider LazyMOMProvider.INSTANCE.registerListener(this); }
protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, Tube masterTubeline) { this.serviceName = serviceName; this.portName = portName; this.binding = binding; this.soapVersion = binding.getSOAPVersion(); this.container = container; this.endpointPolicy = null; this.port = port; this.seiModel = seiModel; this.serviceDef = null; this.implementationClass = null; this.masterTubeline = masterTubeline; this.masterCodec = ((BindingImpl) this.binding).createCodec(); LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager(); this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel); this.context = new ServerPipeAssemblerContext( seiModel, port, this, null /* not known */, false); tubePool = new TubePool(masterTubeline); engine = new Engine(toString(), container); wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel); }
public synchronized void dispose() { if (disposed) { return; } disposed = true; masterTubeline.preDestroy(); for (Handler handler : binding.getHandlerChain()) { for (Method method : handler.getClass().getMethods()) { if (method.getAnnotation(PreDestroy.class) == null) { continue; } try { method.invoke(handler); } catch (Exception e) { logger.log(Level.WARNING, HandlerMessages.HANDLER_PREDESTROY_IGNORE(e.getMessage()), e); } break; } } closeManagedObjectManager(); LazyMOMProvider.INSTANCE.unregisterEndpoint(this); }
protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, Tube masterTubeline) { this.serviceName = serviceName; this.portName = portName; this.binding = binding; this.soapVersion = binding.getSOAPVersion(); this.container = container; this.endpointPolicy = null; this.port = port; this.seiModel = seiModel; this.serviceDef = null; this.implementationClass = null; this.masterTubeline = masterTubeline; this.masterCodec = ((BindingImpl) this.binding).createCodec(); LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager(); this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel); this.context = new ServerPipeAssemblerContext( seiModel, port, this, null /* not known */, false); tubePool = new TubePool(masterTubeline); engine = new Engine(toString(), container); wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel); }
public synchronized void dispose() { if (disposed) { return; } disposed = true; masterTubeline.preDestroy(); for (Handler handler : binding.getHandlerChain()) { for (Method method : handler.getClass().getMethods()) { if (method.getAnnotation(PreDestroy.class) == null) { continue; } try { method.invoke(handler); } catch (Exception e) { logger.log(Level.WARNING, HandlerMessages.HANDLER_PREDESTROY_IGNORE(e.getMessage()), e); } break; } } closeManagedObjectManager(); LazyMOMProvider.INSTANCE.unregisterEndpoint(this); }
/** * Registers the given object as a listener. * * @param listener a listener to be registered */ public void registerListener(DefaultScopeChangeListener listener) { listeners.add(listener); if (!isProviderInDefaultScope()) { listener.scopeChanged(this.scope); } }
protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, Tube masterTubeline) { this.serviceName = serviceName; this.portName = portName; this.binding = binding; this.soapVersion = binding.getSOAPVersion(); this.container = container; this.endpointPolicy = null; this.port = port; this.seiModel = seiModel; this.serviceDef = null; this.implementationClass = null; this.masterTubeline = masterTubeline; this.masterCodec = ((BindingImpl) this.binding).createCodec(); LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager(); this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel); this.context = new ServerPipeAssemblerContext( seiModel, port, this, null /* not known */, false); tubePool = new TubePool(masterTubeline); engine = new Engine(toString(), container); wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel); }
/** * Initializes this provider with a given scope. If the given scope is different than the one this provider is * currently in and the transition between scopes is valid then a event is fired to all registered listeners. * * @param scope a scope to initialize this provider with */ public void initMOMForScope(LazyMOMProvider.Scope scope) { // cannot go backwards between scopes, for possible scope changes see #Scope if ((this.scope == Scope.GLASSFISH_JMX) || (scope == Scope.STANDALONE && (this.scope == Scope.GLASSFISH_JMX || this.scope == Scope.GLASSFISH_NO_JMX)) || this.scope == scope) { return; } this.scope = scope; fireScopeChanged(); }
public synchronized void dispose() { if (disposed) { return; } disposed = true; masterTubeline.preDestroy(); for (Handler handler : binding.getHandlerChain()) { for (Method method : handler.getClass().getMethods()) { if (method.getAnnotation(PreDestroy.class) == null) { continue; } try { method.invoke(handler); } catch (Exception e) { logger.log(Level.WARNING, HandlerMessages.HANDLER_PREDESTROY_IGNORE(e.getMessage()), e); } break; } } closeManagedObjectManager(); LazyMOMProvider.INSTANCE.unregisterEndpoint(this); }
/** * Registers the given object as a listener. * * @param listener a listener to be registered */ public void registerListener(DefaultScopeChangeListener listener) { listeners.add(listener); if (!isProviderInDefaultScope()) { listener.scopeChanged(this.scope); } }
this.endpointPolicy = endpointPolicy; LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager();
/** * Initializes this provider with a given scope. If the given scope is different than the one this provider is * currently in and the transition between scopes is valid then a event is fired to all registered listeners. * * @param scope a scope to initialize this provider with */ public void initMOMForScope(LazyMOMProvider.Scope scope) { // cannot go backwards between scopes, for possible scope changes see #Scope if ((this.scope == Scope.GLASSFISH_JMX) || (scope == Scope.STANDALONE && (this.scope == Scope.GLASSFISH_JMX || this.scope == Scope.GLASSFISH_NO_JMX)) || this.scope == scope) { return; } this.scope = scope; fireScopeChanged(); }
/** * Registers a Webservice Endpoint as a listener. * Webservice Endpoints should rather register through this method than through LazyMOMProvider#registerListener * because generally they need to be notified sooner than arbitrary listener (i.e. object that is dependant on * Webservice Endpoint) * * @param wsEndpoint a Webservice Endpoint to be registered */ public void registerEndpoint(WSEndpointScopeChangeListener wsEndpoint) { endpointsWaitingForMOM.add(wsEndpoint); if (!isProviderInDefaultScope()) { wsEndpoint.scopeChanged(this.scope); } }
this.endpointPolicy = endpointPolicy; LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager();
/** * Registers a Webservice Endpoint as a listener. * Webservice Endpoints should rather register through this method than through LazyMOMProvider#registerListener * because generally they need to be notified sooner than arbitrary listener (i.e. object that is dependant on * Webservice Endpoint) * * @param wsEndpoint a Webservice Endpoint to be registered */ public void registerEndpoint(WSEndpointScopeChangeListener wsEndpoint) { endpointsWaitingForMOM.add(wsEndpoint); if (!isProviderInDefaultScope()) { wsEndpoint.scopeChanged(this.scope); } }
this.endpointPolicy = endpointPolicy; LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager();
/** * Registers a Webservice Endpoint as a listener. * Webservice Endpoints should rather register through this method than through LazyMOMProvider#registerListener * because generally they need to be notified sooner than arbitrary listener (i.e. object that is dependant on * Webservice Endpoint) * * @param wsEndpoint a Webservice Endpoint to be registered */ public void registerEndpoint(WSEndpointScopeChangeListener wsEndpoint) { endpointsWaitingForMOM.add(wsEndpoint); if (!isProviderInDefaultScope()) { wsEndpoint.scopeChanged(this.scope); } }