com.jpattern.core.NullProvider Maven / Gradle / Ivy
package com.jpattern.core;
import com.jpattern.service.log.ILoggerService;
import com.jpattern.service.log.NullLoggerService;
import com.jpattern.service.mail.IMailService;
import com.jpattern.service.mail.NullMailService;
import com.jpattern.core.command.ICommand;
/**
*
* @author Francesco Cina'
*
* 29/gen/2011
*/
public class NullProvider implements IProvider {
private static final long serialVersionUID = 1L;
public IService getService(String aServiceName) {
return new NullService();
}
public boolean contains(String aServiceName) {
return false;
}
@Override
public ILoggerService getLoggerService() {
return new NullLoggerService();
}
@Override
public IMailService getMailService() {
return new NullMailService();
}
@Override
public void accept(ICommand command) {
command.visit(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy