public ServiceEndpointOperationProvides(final QName operation, final URI mep, final PetalsCamelSender sender, final Provides provides) { super(provides.getInterfaceName(), provides.getServiceName(), provides.getEndpointName(), operation, mep, sender); }
public void close(final Provides provides) { this.logger .fine(String.format("Close the JDBC DataSource for '%s/%s-%s'.", provides.getInterfaceName().toString(), provides.getServiceName().toString(), provides.getEndpointName())); try { ((BasicDataSource) this.dataSource).close(); this.logger.fine(String.format("The JDBC DataSource for '%s/%s-%s' has been closed properly.", provides.getInterfaceName().toString(), provides.getServiceName().toString(), provides.getEndpointName())); } catch (final SQLException e) { this.logger.log(Level.WARNING, String.format("The JDBC DataSource for '%s/%s-%s' has not been closed properly.", provides.getInterfaceName().toString(), provides.getServiceName().toString(), provides.getEndpointName()), e); } }
@Override public Logger getComponentChildLogger() { StringBuilder sb = new StringBuilder( getLogger().getName()); sb.append( "." + getProvides().getInterfaceName().getLocalPart()); sb.append( "." + getProvides().getServiceName().getLocalPart()); sb.append( "." + getProvides().getEndpointName()); return Logger.getLogger( sb.toString()); } }
public static String toString(final Provides p) { final QName i = p.getInterfaceName(); final QName s = p.getServiceName(); final String e = p.getEndpointName(); return i + "/" + s + "/" + e; }
@Override protected void doUndeploy(final ServiceUnitDataHandler suDH) throws PEtALSCDKException { this.logger.fine("Start MailSuManager.doUndeploy(SU =" + suDH.getName() + ")"); try { // Process section 'provides' for (final Provides provide : suDH.getDescriptor().getServices().getProvides()) { // Remove the mail operation in the map with the corresponding end-point this.getComponent().removeMailOperations(provide.getEndpointName()); } } finally { this.logger.fine("End MailSuManager.doUndeploy()"); } }
@Override protected void doUndeploy(final ServiceUnitDataHandler suDH) throws PEtALSCDKException { this.logger.fine("Start ActivitiSuManager.doUndeploy(SU =" + suDH.getName() + ")"); try { final String edptName = suDH.getDescriptor().getServices().getProvides().iterator().next() .getEndpointName(); // Remove the ActivitiOperation in the map with the corresponding end-point getComponent().removeActivitiService(edptName); /** * // Get the operation Name of the end point ServiceUnitDataHandler suDataHandler * =this.getSUDataHandlerForEndpoint(serviceEndpoint); List<QName> operations = * suDataHandler.getEndpointOperationsList(serviceEndpoint); * * for ( QName operation : operations) { eptAndOperation = new * EptAndOperation(edptName,operation.getLocalPart()); // Remove the ActivitiOperation in the map with the * corresponding end-point and Operation ((ActivitiSE) * this.component).removeActivitiOperation(eptAndOperation); logger.info("*** ept: "+ * eptAndOperation.getEptName() + " operation : "+ eptAndOperation.getOperationName()); logger.info( * " is removed from MAP eptOperationToActivitiOperation" ); } */ // TODO Manage the undeployement of the process: be careful of multi SU deployement for the same process } finally { this.logger.fine("End ActivitiSuManager.doUndeploy()"); } }
final String edptName = provide.getEndpointName(); final QName interfaceName = provide.getInterfaceName(); final QName serviceName = provide.getServiceName();
this.logger.fine(String.format("The JDBC DataSource for '%s/%s-%s' has been created.", provides.getInterfaceName().toString(), provides.getServiceName().toString(), provides.getEndpointName())); this.logger.fine(String.format("The SQL service for '%s/%s-%s' has been created.", provides.getInterfaceName().toString(), provides.getServiceName().toString(), provides.getEndpointName()));
suDH.getInstallRoot(), outputAttachmentName, provides.getEndpointName(), serviceUnitName, xslParamNameToXslParamBean);
final String endpointName = provides.getEndpointName(); final QName interfaceName = provides.getInterfaceName(); final QName serviceName = provides.getServiceName();
@Override protected void doDeploy(final ServiceUnitDataHandler suDH) throws PEtALSCDKException { final Jbi jbiDescriptor = suDH.getDescriptor(); // Control that there is only one Provides section in the SU if (!jbiDescriptor.getServices().getConsumes().isEmpty()) throw new PEtALSCDKException( "'Consumes' sections are not supported by this component." ); final List<Provides> providesList = jbiDescriptor.getServices().getProvides(); if( providesList.size() != 1 ) throw new PEtALSCDKException( "Only one 'Provides' section is allowed by this component." ); // Control that there is the required parameter final Provides provides = providesList.get(0); final SuConfigurationParameters extensions = suDH.getConfigurationExtensions(provides); final String schemaFileName = extensions.get(XSD_PATH); if( StringHelper.isNullOrEmpty( schemaFileName )) throw new PEtALSCDKException( "A configuration for this component must define the '" + XSD_PATH + "' parameter."); // Create a configuration element final ValidationConfiguration config = new ValidationConfiguration( schemaFileName.trim(), suDH.getInstallRoot(), provides.getEndpointName(), suDH.getName() ); // Create a handler and register these elements final ValidationConfigurationHandler handler = new ValidationConfigurationHandler(config); handler.start(this.logger); this.suNameToValidationConfigurationHandler.put(suDH.getName(), handler); getComponent().registerValidationConfigurationHandler(provides.getEndpointName(), handler); }
final String edptName = provides.getEndpointName();
final Endpoint endpoint = service.getEndpoint(provides.getEndpointName()); if (endpoint == null) { throw new InvalidJBIConfigurationException( "Can't find the endpoint '" + provides.getEndpointName() + "' in the description"); "No binding defined for the endpoint '" + provides.getEndpointName() + "' in the description"); if (interfaceType == null) { throw new InvalidJBIConfigurationException("No interface defined for the binding of ednpoint '" + provides.getEndpointName() + "' in the description"); throw new InvalidJBIConfigurationException("The interface of the endpoint '" + provides.getEndpointName() + "' is invalid: '" + interfaceType.getQName() + "' instead of '" + interfaceType + "'");
final String edptName = provides.getEndpointName(); final QName serviceName = provides.getServiceName(); for (final ActivitiOperation operation : operations) {
final Logger serviceLogger = getComponent().getContext().getLogger(provides.getEndpointName(), null); context.setLogger(serviceLogger); } catch (MissingResourceException | JBIException e) { throw new PEtALSCDKException("Can't get logger for Provides " + provides.getEndpointName(), e);
theEndpointName = this.getEndpointName(); strategy.appendField(locator, this, "endpointName", buffer, theEndpointName, (this.endpointName!= null));