View Javadoc
1   /*
2    * Copyright 2008-2016 Brian Thomas Matthews
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package com.btmatthews.maven.plugins.ldap.opendj;
18  
19  import com.btmatthews.utils.monitor.Server;
20  import com.btmatthews.utils.monitor.ServerFactory;
21  
22  /**
23   * Factory that creates instances of {@link com.btmatthews.maven.plugins.ldap.opendj.OpenDJServer}.
24   *
25   * @author <a href="mailto:brian@btmatthews.com">Brian Matthews</a>
26   * @since 1.1.1
27   */
28  public class OpenDJServerFactory implements ServerFactory {
29  
30      /**
31       * Return the name of the servers created by this factory.
32       *
33       * @return Always returns {@code opendj}.
34       */
35      public String getServerName() {
36          return "opendj";
37      }
38  
39      /**
40       * Create new instance of {@link com.btmatthews.maven.plugins.ldap.opendj.OpenDJServer}.
41       *
42       * @return The newly create instance of {@link com.btmatthews.maven.plugins.ldap.opendj.OpenDJServer}.
43       */
44      public Server createServer() {
45          return new OpenDJServer();
46      }
47  }