/** * Checks if the parameter is null or empty and log in error if it is null * * @param parameter * parameter to be tested * @param parameterName * name of the parameter * @param log * logger to use * @throws IllegalArgumentException * if parameter is null */ public static void isNullOrEmptyParameterWithLog(String parameter, String parameterName, LoggingUtil log) { isEmptyParameterWithLog(parameter, parameterName, log); isNullParameterWithLog(parameter, parameterName, log); }
/** * {@inheritDoc} */ public boolean isExchangeWithConsumerOkayForComponent( org.ow2.petals.jbi.messaging.endpoint.ServiceEndpoint internalEndpoint, MessageExchange exchange) { this.log.start(); ParameterCheckHelper.isNullParameterWithLog(internalEndpoint, "Endpoint", this.log); boolean test = true; try { // Retrieve a connection to the JMX server of the container were the // component is deployed final RemoteJMXServer server = this.jmxService.getRemoteJMXServer(internalEndpoint .getLocation().getContainerName()); // Ask the component if it is ok to accept the exchange final Boolean bool = (Boolean) server.invoke(server.getAdminServiceMBeanName(), RemoteJMXServer.IS_OK_WITH_CONS, new Object[] { internalEndpoint.getLocation().getComponentName(), internalEndpoint, exchange }, new String[] { String.class.getName(), ServiceEndpoint.class.getName(), MessageExchange.class.getName() }); test = bool.booleanValue(); } catch (final Exception e) { this.log.error("Problem in isExchangeWithConsumerOkayForComponent", e); } this.log.end(); return test; }
public String deploy(String serviceAssemblyZipUrl) throws Exception { this.log.start(); ParameterCheckHelper.isNullParameterWithLog(serviceAssemblyZipUrl, "serviceAssemblyZipUrl", this.log);
public String undeploy(String serviceAssemblyName) throws Exception { this.log.start(); ParameterCheckHelper.isNullParameterWithLog(serviceAssemblyName, "serviceAssemblyZipUrl", this.log);