01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.examples.tools.config;
10:
11: import java.net.Socket;
12:
13: /**
14: * This class invokes the shutdown section of the XML configuration file bundled
15: * with this example. <br />
16: * Refer to the ConfigurationLoader documentation for further information.
17: *
18: * @version $Revision: 1.1 $
19: * @see ConfigurationStartup
20: */
21: public class ConfigurationShutdown {
22: public static void main(String[] args) throws Exception {
23: String shutdownCommand = "shutdown";
24: Socket socket = new Socket("127.0.0.1", 9876);
25: socket.getOutputStream().write(shutdownCommand.getBytes());
26: socket.close();
27: }
28: }
|