|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.jme3.network.service.ServiceManager
com.jme3.network.connection.Server
Server
from Network
instead.
@Deprecated public class Server
The class where your SpiderMonkey adventures start. The server class manages the TCP and UDP servers. Using the constructors where you either provide ports or the instances, they will bind automatically. If you do not want this to happen, use the no arg constructor, and then call bind later on.
フィールドの概要 |
---|
クラス com.jme3.network.service.ServiceManager から継承されたフィールド |
---|
CLIENT, SERVER |
コンストラクタの概要 | |
---|---|
Server()
推奨されていません。 Default constructor. |
|
Server(int tcpPort,
int udpPort)
推奨されていません。 Call createServer() on Network instead. |
|
Server(TCPConnection tcp,
java.net.SocketAddress tcpAddress)
推奨されていません。 Constructor for providing a TCP server instance. |
|
Server(TCPConnection tcp,
UDPConnection udp,
java.net.SocketAddress tcpAddress,
java.net.SocketAddress udpAddress)
推奨されていません。 Constructor providing custom instances of the servers and its addresses. |
|
Server(UDPConnection udp,
java.net.SocketAddress udpAddress)
推奨されていません。 Constructor for providing a UDP server instance. |
メソッドの概要 | |
---|---|
void |
addConnectionListener(ConnectionListener listener)
推奨されていません。 |
void |
addConnectorFilter(ConnectorFilter filter)
推奨されていません。 |
void |
addLocalConnectionListener(ConnectionListener listener)
推奨されていません。 |
void |
addMessageListener(MessageListener listener)
推奨されていません。 |
void |
addMessageListener(MessageListener listener,
java.lang.Class... classes)
推奨されていません。 |
void |
bind(int tcpPort,
int udpPort)
推奨されていません。 Bind method for when the no arg constructor was used. |
void |
broadcast(Message message)
推奨されていません。 Broadcast a message. |
void |
broadcastExcept(Client except,
Message message)
推奨されていません。 Broadcast a message, except to the given client. |
Client |
getClientByID(int clientID)
推奨されていません。 Get a specific client based on the provided clientID. |
java.util.List<Client> |
getConnectors()
推奨されていません。 Get the combined connectors, meaning TCP and UDP are combined into one client. |
int |
getServerID()
推奨されていません。 |
java.util.List<Client> |
getTCPConnectors()
推奨されていません。 Get all the connectors for the TCP connection. |
java.util.List<Client> |
getUDPConnectors()
推奨されていません。 Get all the connectors for the UDP connection. |
boolean |
isRunning()
推奨されていません。 |
void |
removeConnectionListener(ConnectionListener listener)
推奨されていません。 |
void |
removeConnectorFilter(ConnectorFilter filter)
推奨されていません。 |
void |
removeLocalConnectionListener(ConnectionListener listener)
推奨されていません。 |
void |
removeMessageListener(MessageListener listener)
推奨されていません。 |
void |
removeMessageListener(MessageListener listener,
java.lang.Class... classes)
推奨されていません。 |
void |
setLabel(java.lang.String label)
推奨されていません。 |
void |
start()
推奨されていません。 Start this server. |
void |
start(int sleep)
推奨されていません。 Start this server with given sleep time. |
void |
stop()
推奨されていません。 Stop this server. |
void |
stop(DisconnectMessage message)
推奨されていません。 Stops the server with custom message. |
java.lang.String |
toString()
推奨されていません。 |
クラス com.jme3.network.service.ServiceManager から継承されたメソッド |
---|
getService |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
---|
public Server()
Server#[serverID]
public Server(TCPConnection tcp, UDPConnection udp, java.net.SocketAddress tcpAddress, java.net.SocketAddress udpAddress) throws java.io.IOException
tcp
- The TCPConnection instance to manage.udp
- The UDPConnection instance to manage.tcpAddress
- The TCP address to bind to.udpAddress
- The UDP address to bind to.
java.io.IOException
- When a bind error has occurred.public Server(TCPConnection tcp, java.net.SocketAddress tcpAddress) throws java.io.IOException
tcp
- The TCPConnection instance.tcpAddress
- The address to bind to.
java.io.IOException
- When a binding error occurs.public Server(UDPConnection udp, java.net.SocketAddress udpAddress) throws java.io.IOException
udp
- The UDP server instance.udpAddress
- The address to bind to.
java.io.IOException
- When a binding error occurs.@Deprecated public Server(int tcpPort, int udpPort) throws java.io.IOException
Network
instead.
tcpPort
- The TCP port to use.udpPort
- The UDP port to use.
java.io.IOException
- When a binding error occurs.メソッドの詳細 |
---|
public void bind(int tcpPort, int udpPort) throws java.lang.IllegalArgumentException, java.io.IOException
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 binding error occurs.public void broadcast(Message message) throws java.io.IOException
message
- The message to broadcast.
java.io.IOException
- When a writing error occurs.public void broadcastExcept(Client except, Message message) throws java.io.IOException
except
- The client to refrain from sending the message to.message
- The message to send.
java.io.IOException
- When a writing error occurs.public void start() throws java.io.IOException
java.io.IOException
- When an error occurs.public void start(int sleep) throws java.io.IOException
sleep
- The sleep time.
java.io.IOException
- When an error occurs.public void stop() throws java.io.IOException
java.io.IOException
- When a writing error occurs.public void stop(DisconnectMessage message) throws java.io.IOException
java.io.IOException
- When a writing error occurs.public boolean isRunning()
public int getServerID()
public void setLabel(java.lang.String label)
public java.lang.String toString()
java.lang.Object
内の toString
public java.util.List<Client> getTCPConnectors()
public java.util.List<Client> getUDPConnectors()
public java.util.List<Client> getConnectors()
public Client getClientByID(int clientID)
clientID
- The clientID identifying the client requested.
public void addConnectorFilter(ConnectorFilter filter)
public void removeConnectorFilter(ConnectorFilter filter)
public void addLocalConnectionListener(ConnectionListener listener)
public void removeLocalConnectionListener(ConnectionListener listener)
public void addConnectionListener(ConnectionListener listener)
public void removeConnectionListener(ConnectionListener listener)
public void addMessageListener(MessageListener listener)
public void addMessageListener(MessageListener listener, java.lang.Class... classes)
public void removeMessageListener(MessageListener listener)
public void removeMessageListener(MessageListener listener, java.lang.Class... classes)
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |