diff --git a/engine/src/networking/com/jme3/network/base/package.html b/engine/src/networking/com/jme3/network/base/package.html new file mode 100644 index 000000000..cf08401ce --- /dev/null +++ b/engine/src/networking/com/jme3/network/base/package.html @@ -0,0 +1,8 @@ + + +
+The base package contains the default implementations for the +{@link com.jme3.network.Client} and {@link com.jme3.network.Server} +interfaces from the public API. + + diff --git a/engine/src/networking/com/jme3/network/connection/Client.java b/engine/src/networking/com/jme3/network/connection/Client.java index 6023df7b4..58b5896a1 100644 --- a/engine/src/networking/com/jme3/network/connection/Client.java +++ b/engine/src/networking/com/jme3/network/connection/Client.java @@ -54,6 +54,10 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +/** + * @deprecated Use {@link com.jme3.network.Client} from {@link com.jme3.network.Network} instead. + */ +@Deprecated public class Client extends ServiceManager { protected Logger log = Logger.getLogger(Client.class.getName()); @@ -83,7 +87,9 @@ public class Client extends ServiceManager { /** * Constructs this client. + * @deprecated Call createClient() on {@link com.jme3.network.Network} instead. */ + @Deprecated public Client() { this(false); } @@ -174,7 +180,9 @@ public class Client extends ServiceManager { * @param tcpPort The TCP port to use. * @param udpPort The UDP port to use. * @throws IOException When a connection error occurs. + * @deprecated Call connectToServer() on {@link com.jme3.network.Network} instead. */ + @Deprecated public Client(String ip, int tcpPort, int udpPort) throws IOException { this(); diff --git a/engine/src/networking/com/jme3/network/connection/Server.java b/engine/src/networking/com/jme3/network/connection/Server.java index 3cd0c6a0e..91359f97c 100644 --- a/engine/src/networking/com/jme3/network/connection/Server.java +++ b/engine/src/networking/com/jme3/network/connection/Server.java @@ -55,7 +55,9 @@ import java.util.logging.Logger; * no arg constructor, and then call bind later on. * * @author Lars Wesselius + * @deprecated Use {@link com.jme3.network.Server} from {@link com.jme3.network.Network} instead. */ +@Deprecated public class Server extends ServiceManager { protected Logger log = Logger.getLogger(Server.class.getName()); @@ -154,7 +156,9 @@ public class Server extends ServiceManager { * @param tcpPort The TCP port to use. * @param udpPort The UDP port to use. * @throws IOException When a binding error occurs. + * @deprecated Call createServer() on {@link com.jme3.network.Network} instead. */ + @Deprecated public Server(int tcpPort, int udpPort) throws IOException { this(); diff --git a/engine/src/networking/com/jme3/network/events/ConnectionListener.java b/engine/src/networking/com/jme3/network/events/ConnectionListener.java index a2b8ff672..688d5e471 100644 --- a/engine/src/networking/com/jme3/network/events/ConnectionListener.java +++ b/engine/src/networking/com/jme3/network/events/ConnectionListener.java @@ -38,7 +38,9 @@ import com.jme3.network.connection.Client; * Listener for server events. * * @author Lars Wesselius + * @deprecated Use {@link com.jme3.network.ConnectionListener} instead. */ +@Deprecated public interface ConnectionListener { public void clientConnected(Client client); public void clientDisconnected(Client client); diff --git a/engine/src/networking/com/jme3/network/events/MessageListener.java b/engine/src/networking/com/jme3/network/events/MessageListener.java index 232aabefc..71abde040 100644 --- a/engine/src/networking/com/jme3/network/events/MessageListener.java +++ b/engine/src/networking/com/jme3/network/events/MessageListener.java @@ -38,7 +38,9 @@ import com.jme3.network.message.Message; * Listener for messages. * * @author Lars Wesselius + * @deprecated Use {@link com.jme3.network.MessageListener} instead. */ +@Deprecated public interface MessageListener { public void messageReceived(Message message); public void messageSent(Message message); diff --git a/engine/src/networking/com/jme3/network/kernel/package.html b/engine/src/networking/com/jme3/network/kernel/package.html index 917fba3d0..0e59c725c 100644 --- a/engine/src/networking/com/jme3/network/kernel/package.html +++ b/engine/src/networking/com/jme3/network/kernel/package.html @@ -8,19 +8,19 @@ have to deal with these classes unless they are writing their own client and server implementations that diverge from the standard classes that are provided. -{@link Kernel} defines the core of a server-side message +
{@link com.jme3.network.kernel.Kernel} defines the core of a server-side message broker that abstracts away the specific transport and underlying threading model used. For example, it might use NIO selectors in a single threaded model or straight multithreaded socket model. Or it might implement SSL connections. Once created, -{@link Kernel} users don't need to care about the details.
+{@link com.jme3.network.kernel.Kernel} users don't need to care about the details. -{@link Endpoint} is a managed connection within a {@link Kernel} -providing kernel to client connectivity.
+{@link com.jme3.network.kernel.Endpoint} is a managed connection within a +{@link com.jme3.network.kernel.Kernel} providing kernel to client connectivity.
-{@link Connector} defines the basic client-side message sender -and these objects are typically used to connect to a {@link Kernel} though -they can connect to any network port that supports the implementation's +
{@link com.jme3.network.kernel.Connector} defines the basic client-side message sender +and these objects are typically used to connect to a {@link com.jme3.network.kernel.Kernel} +though they can connect to any network port that supports the implementation's protocol. Implementations are provided for straight TCP and UDP communication and could be extended to support SSL or different threading models.
diff --git a/engine/src/networking/com/jme3/network/message/Message.java b/engine/src/networking/com/jme3/network/message/Message.java index b48989079..032fdf784 100644 --- a/engine/src/networking/com/jme3/network/message/Message.java +++ b/engine/src/networking/com/jme3/network/message/Message.java @@ -65,6 +65,9 @@ public class Message implements com.jme3.network.Message { return this; } + /** + * @deprecated This method always returns null in the new API. + */ @Deprecated public Client getClient() { return connector; @@ -75,6 +78,9 @@ public class Message implements com.jme3.network.Message { this.connector = connector; } + /** + * @deprecated This method always returns null in the new API. + */ @Deprecated public Connection getConnection() { return connection; diff --git a/engine/src/networking/com/jme3/network/package.html b/engine/src/networking/com/jme3/network/package.html new file mode 100644 index 000000000..4c01ab769 --- /dev/null +++ b/engine/src/networking/com/jme3/network/package.html @@ -0,0 +1,11 @@ + + + +The network package contains the public API for the jME3 +SpiderMonkey networking module. The {@link com.jme3.network.Network} +class is the entry point for creating default implementations +of {@link com.jme3.network.Client} and {@link com.jme3.network.Server} +implementations. + + +