1 | /* |
2 | * Copyright 2006-2007 the original author or authors. |
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 | package org.springframework.batch.core.launch.support; |
17 | |
18 | /** |
19 | * Implementation of the {@link SystemExiter} interface that calls the standards |
20 | * System.exit method. It should be noted that there will be no unit tests for |
21 | * this class, since there is only one line of actual code, that would only be |
22 | * testable by mocking System or Runtime. |
23 | * |
24 | * @author Lucas Ward |
25 | * @author Dave Syer |
26 | * |
27 | */ |
28 | public class JvmSystemExiter implements SystemExiter { |
29 | |
30 | /** |
31 | * Delegate call to System.exit() with the argument provided. Do not use |
32 | * this at home children! |
33 | * |
34 | * @see org.springframework.batch.core.launch.support.SystemExiter#exit(int) |
35 | */ |
36 | public void exit(int status) { |
37 | System.exit(status); |
38 | } |
39 | |
40 | } |