001/* 002 * Trident - A Multithreaded Server Alternative 003 * Copyright 2014 The TridentSDK Team 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package net.tridentsdk; 019 020import net.tridentsdk.config.Config; 021import net.tridentsdk.util.TridentLogger; 022 023import javax.annotation.concurrent.ThreadSafe; 024import java.net.InetAddress; 025 026/** 027 * The access point to the server information 028 * 029 * @author The TridentSDK Team 030 * @since 0.3-alpha-DP 031 */ 032@ThreadSafe 033public interface Server { 034 /** 035 * Gets the port the server currently runs on 036 * 037 * @return the port the server runs on 038 */ 039 int port(); 040 041 /** 042 * Gets the Internet Address of this server 043 * 044 * @return the address of this server 045 */ 046 InetAddress ip(); 047 048 /** 049 * The server's console 050 * 051 * @return the server console 052 */ 053 Console console(); 054 055 /** 056 * Gets the server's console logger for the this class 057 * 058 * @return the server's logger 059 */ 060 TridentLogger logger(); 061 062 /** 063 * The server configuration file 064 * 065 * @return the server config 066 */ 067 Config config(); 068 069 /** 070 * Gets the server's display information on the server list 071 * 072 * @return the display information manager 073 */ 074 PingInfo info(); 075 076 /** 077 * Gets the version of Trident that the server is currently running 078 * 079 * @return a String representing the current version of the Trident server that the server is running 080 */ 081 String version(); 082 083 /** 084 * Closes the connections of the server, disconnects all clients, and unloads everything, then exits the JVM. 085 */ 086 void shutdown(); 087}