com.jme3.network.connection
クラス Client

java.lang.Object
  上位を拡張 com.jme3.network.service.ServiceManager
      上位を拡張 com.jme3.network.connection.Client

推奨されていません。 Use Client from Network instead.

@Deprecated
public class Client
extends ServiceManager


フィールドの概要
 
クラス com.jme3.network.service.ServiceManager から継承されたフィールド
CLIENT, SERVER
 
コンストラクタの概要
Client()
          推奨されていません。 Call createClient() on Network instead.
Client(java.lang.String ip, int tcpPort, int udpPort)
          推奨されていません。 Call connectToServer() on Network instead.
Client(TCPConnection tcp, java.net.SocketAddress tcpAddress)
          推奨されていません。 Constructor for providing a TCP client instance.
Client(TCPConnection tcp, UDPConnection udp, java.net.SocketAddress tcpAddress, java.net.SocketAddress udpAddress)
          推奨されていません。 Constructor providing custom instances of the clients and its addresses.
Client(UDPConnection udp, java.net.SocketAddress updAddress)
          推奨されていません。 Constructor for providing a UDP client instance.
 
メソッドの概要
 void addConnectionListener(ConnectionListener listener)
          推奨されていません。  
 void addMessageListener(MessageListener listener)
          推奨されていません。  
 void addMessageListener(MessageListener listener, java.lang.Class... classes)
          推奨されていません。  
 void connect(java.lang.String ip, int tcpPort, int udpPort)
          推奨されていません。 Connect method for when the no arg constructor was used.
 void disconnect()
          推奨されていません。 Disconnect from the server with the default disconnection type: USER_REQUESTED.
 void disconnect(DisconnectMessage msg)
          推奨されていません。 Disconnect from the server.
 void disconnect(java.lang.String type)
          推奨されていません。 Disconnect from the server.
 java.util.List<java.net.InetAddress> discoverHosts(int port, int timeout)
          推奨されていません。  
 boolean equals(java.lang.Object obj)
          推奨されていません。 
 int getClientID()
          推奨されていません。  
 java.nio.channels.DatagramChannel getDatagramChannel()
          推奨されていません。  
 java.net.SocketAddress getDatagramReceiver()
          推奨されていません。  
 MessageQueue getMessageQueue()
          推奨されていません。  
 long getPlayerID()
          推奨されていません。  
 java.nio.channels.SocketChannel getSocketChannel()
          推奨されていません。  
 TCPConnection getTCPConnection()
          推奨されていません。  
 UDPConnection getUDPConnection()
          推奨されていません。  
 void kick(DisconnectMessage message)
          推奨されていません。 Kick this client from the server, with given kick reason.
 void kick(java.lang.String reason)
          推奨されていません。 Kick this client from the server, with given kick reason.
 void removeConnectionListener(ConnectionListener listener)
          推奨されていません。  
 void removeMessageListener(MessageListener listener)
          推奨されていません。  
 void removeMessageListener(MessageListener listener, java.lang.Class... classes)
          推奨されていません。  
 void send(Message message)
          推奨されていません。 Send a message.
 void setDatagramChannel(java.nio.channels.DatagramChannel channel)
          推奨されていません。  
 void setDatagramReceiver(java.net.SocketAddress address)
          推奨されていません。  
 void setLabel(java.lang.String label)
          推奨されていません。  
 void setPlayerID(long id)
          推奨されていません。  
 void setSocketChannel(java.nio.channels.SocketChannel channel)
          推奨されていません。  
 void setTCPConnection(TCPConnection con)
          推奨されていません。  
 void setUDPConnection(UDPConnection con)
          推奨されていません。  
 void start()
          推奨されていません。 Start this client.
 void start(int sleep)
          推奨されていません。 Start this client with given sleep time.
 java.lang.String toString()
          推奨されていません。  
 
クラス com.jme3.network.service.ServiceManager から継承されたメソッド
getService
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Client

@Deprecated
public Client()
推奨されていません。 Call createClient() on Network instead.

Constructs this client.


Client

public Client(TCPConnection tcp,
              UDPConnection udp,
              java.net.SocketAddress tcpAddress,
              java.net.SocketAddress udpAddress)
       throws java.io.IOException
推奨されていません。 
Constructor providing custom instances of the clients and its addresses.

パラメータ:
tcp - The TCPConnection instance to manage.
udp - The UDPConnection instance to manage.
tcpAddress - The TCP address to connect to.
udpAddress - The UDP address to connect to.
例外:
java.io.IOException - When a connect error has occurred.

Client

public Client(TCPConnection tcp,
              java.net.SocketAddress tcpAddress)
       throws java.io.IOException
推奨されていません。 
Constructor for providing a TCP client instance. UDP will be disabled.

パラメータ:
tcp - The TCPConnection instance.
tcpAddress - The address to connect to.
例外:
java.io.IOException - When a connection error occurs.

Client

public Client(UDPConnection udp,
              java.net.SocketAddress updAddress)
       throws java.io.IOException
推奨されていません。 
Constructor for providing a UDP client instance. TCP will be disabled.

パラメータ:
udp - The UDP client instance.
updAddress - The address to connect to.
例外:
java.io.IOException - When a connection error occurs.

Client

@Deprecated
public Client(java.lang.String ip,
                         int tcpPort,
                         int udpPort)
       throws java.io.IOException
推奨されていません。 Call connectToServer() on Network instead.

Simple constructor for providing TCP port and UDP port. Will bind using on all interfaces, on given ports.

パラメータ:
ip - The IP address where the server are located.
tcpPort - The TCP port to use.
udpPort - The UDP port to use.
例外:
java.io.IOException - When a connection error occurs.
メソッドの詳細

connect

public void connect(java.lang.String ip,
                    int tcpPort,
                    int udpPort)
             throws java.lang.IllegalArgumentException,
                    java.io.IOException
推奨されていません。 
Connect method for when the no arg constructor was used.

パラメータ:
ip - The IP address to connect to.
tcpPort - The TCP port to use. To turn off, use -1.
udpPort - The UDP port to use. To turn off, use -1.
例外:
java.lang.IllegalArgumentException - When an illegal argument was given.
java.io.IOException - When a connection error occurs.

send

public void send(Message message)
          throws java.io.IOException
推奨されていません。 
Send a message. Whether it's over TCP or UDP is determined by the message flag.

パラメータ:
message - The message to send.
例外:
java.io.IOException - When a writing error occurs.

disconnect

public void disconnect(java.lang.String type)
                throws java.io.IOException
推奨されていません。 
Disconnect from the server.

パラメータ:
type - See DisconnectMessage for the available types.
例外:
java.io.IOException - When a disconnection error occurs.

disconnect

public void disconnect(DisconnectMessage msg)
                throws java.io.IOException
推奨されていません。 
Disconnect from the server.

パラメータ:
msg - The custom DisconnectMessage to use.
例外:
java.io.IOException - When a disconnection error occurs.

disconnect

public void disconnect()
                throws java.io.IOException
推奨されていません。 
Disconnect from the server with the default disconnection type: USER_REQUESTED.

例外:
java.io.IOException - When a disconnection error occurs.

kick

public void kick(java.lang.String reason)
          throws java.io.IOException
推奨されていません。 
Kick this client from the server, with given kick reason.

パラメータ:
reason - The reason this client was kicked.
例外:
java.io.IOException - When a writing error occurs.

kick

public void kick(DisconnectMessage message)
          throws java.io.IOException
推奨されていません。 
Kick this client from the server, with given kick reason.

パラメータ:
message - The custom disconnect message.
例外:
java.io.IOException - When a writing error occurs.

discoverHosts

public java.util.List<java.net.InetAddress> discoverHosts(int port,
                                                          int timeout)
                                                   throws java.io.IOException
推奨されていません。 
例外:
java.io.IOException

setLabel

public void setLabel(java.lang.String label)
推奨されていません。 

setSocketChannel

public void setSocketChannel(java.nio.channels.SocketChannel channel)
推奨されていません。 

getSocketChannel

public java.nio.channels.SocketChannel getSocketChannel()
推奨されていません。 

setDatagramChannel

public void setDatagramChannel(java.nio.channels.DatagramChannel channel)
推奨されていません。 

getDatagramChannel

public java.nio.channels.DatagramChannel getDatagramChannel()
推奨されていません。 

setDatagramReceiver

public void setDatagramReceiver(java.net.SocketAddress address)
推奨されていません。 

getDatagramReceiver

public java.net.SocketAddress getDatagramReceiver()
推奨されていません。 

setTCPConnection

public void setTCPConnection(TCPConnection con)
推奨されていません。 

setUDPConnection

public void setUDPConnection(UDPConnection con)
推奨されていません。 

getTCPConnection

public TCPConnection getTCPConnection()
推奨されていません。 

getUDPConnection

public UDPConnection getUDPConnection()
推奨されていません。 

getMessageQueue

public MessageQueue getMessageQueue()
推奨されていません。 

start

public void start()
推奨されていません。 
Start this client.


start

public void start(int sleep)
推奨されていません。 
Start this client with given sleep time. Higher sleep times may affect the system's response time negatively, whereas lower values may increase CPU load. Use only when you're certain.

パラメータ:
sleep - The sleep time.

getClientID

public int getClientID()
推奨されていません。 

getPlayerID

public long getPlayerID()
推奨されていません。 

setPlayerID

public void setPlayerID(long id)
推奨されていません。 

toString

public java.lang.String toString()
推奨されていません。 
オーバーライド:
クラス java.lang.Object 内の toString

addConnectionListener

public void addConnectionListener(ConnectionListener listener)
推奨されていません。 

removeConnectionListener

public void removeConnectionListener(ConnectionListener listener)
推奨されていません。 

addMessageListener

public void addMessageListener(MessageListener listener)
推奨されていません。 

addMessageListener

public void addMessageListener(MessageListener listener,
                               java.lang.Class... classes)
推奨されていません。 

removeMessageListener

public void removeMessageListener(MessageListener listener)
推奨されていません。 

removeMessageListener

public void removeMessageListener(MessageListener listener,
                                  java.lang.Class... classes)
推奨されていません。 

equals

public boolean equals(java.lang.Object obj)
推奨されていません。 

オーバーライド:
クラス java.lang.Object 内の equals