|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.jme3.network.connection.Connection
public abstract class Connection
Base class for a connection method. Extend this if you have some other fancy way of dealing with connections. This class provides basic message handling, connection filtering and handles the selector.
コンストラクタの概要 | |
---|---|
Connection()
|
メソッドの概要 | |
---|---|
abstract void |
accept(java.nio.channels.SelectableChannel channel)
Accept an incoming connection. |
void |
addConnectionListener(ConnectionListener listener)
|
void |
addConnectorFilter(ConnectorFilter filter)
Add a connector filter for this connection. |
void |
addMessageListener(java.lang.Class messageClass,
MessageListener listener)
|
void |
addMessageListener(MessageListener listener)
|
void |
addToDisconnectionQueue(Client client)
|
abstract void |
bind(java.net.SocketAddress address)
Bind to an address. |
abstract void |
cleanup()
Called when the connection implementation should clean up. |
abstract void |
connect(java.nio.channels.SelectableChannel channel)
Finish the connection. |
abstract void |
connect(java.net.SocketAddress address)
Connect to a server using this overload. |
java.util.List<Client> |
getConnectors()
Get the combined connectors, meaning TCP and UDP are combined into one client. |
java.util.List<Client> |
getLocalConnectors()
Get all the connectors. |
boolean |
isAlive()
Return whether this connection is still alive. |
abstract void |
read(java.nio.channels.SelectableChannel channel)
Read from the channel. |
void |
removeConnectionListener(ConnectionListener listener)
|
void |
removeConnectorFilter(ConnectorFilter filter)
Remove a connector filter for this connection. |
void |
removeMessageListener(java.lang.Class messageClass,
MessageListener listener)
|
void |
removeMessageListener(MessageListener listener)
|
void |
run()
|
abstract void |
sendObject(Client connector,
java.lang.Object object)
Send an object to the connector. |
abstract void |
sendObject(java.lang.Object object)
Send an object to the server. |
java.lang.String |
shouldFilterConnector(java.net.InetSocketAddress address)
Determine whether this connection should be filtered. |
abstract void |
write(java.nio.channels.SelectableChannel channel)
Write to a channel. |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public Connection()
メソッドの詳細 |
---|
public void addConnectorFilter(ConnectorFilter filter)
filter
- The filter to add.public void removeConnectorFilter(ConnectorFilter filter)
filter
- The filter to remove.public java.lang.String shouldFilterConnector(java.net.InetSocketAddress address)
address
- The address that should be checked.
public void run()
java.lang.Runnable
内の run
public java.util.List<Client> getLocalConnectors()
public java.util.List<Client> getConnectors()
public boolean isAlive()
public abstract void accept(java.nio.channels.SelectableChannel channel) throws java.io.IOException
channel
- The channel.
java.io.IOException
- When a problem occurs.public abstract void connect(java.nio.channels.SelectableChannel channel) throws java.io.IOException
channel
- The channel.
java.io.IOException
- When a problem occurs.public abstract void read(java.nio.channels.SelectableChannel channel) throws java.io.IOException
channel
- The channel.
java.io.IOException
- When a problem occurs.public abstract void write(java.nio.channels.SelectableChannel channel) throws java.io.IOException
channel
- The channel to write to.
java.io.IOException
- When a problem occurs.public abstract void connect(java.net.SocketAddress address) throws java.io.IOException
address
- The address to connect to.
java.io.IOException
- When a problem occurs.public abstract void bind(java.net.SocketAddress address) throws java.io.IOException
address
- The address to bind to.
java.io.IOException
- When a problem occurs.public abstract void sendObject(java.lang.Object object) throws java.io.IOException
object
- The object to send.
java.io.IOException
- When a writing error occurs.public abstract void sendObject(Client connector, java.lang.Object object) throws java.io.IOException
connector
- The connector to send to.object
- The object to send.
java.io.IOException
- When a writing error occurs.public abstract void cleanup() throws java.io.IOException
java.io.IOException
- When a problem occurs.public void addToDisconnectionQueue(Client client)
public void addConnectionListener(ConnectionListener listener)
public void removeConnectionListener(ConnectionListener listener)
public void addMessageListener(MessageListener listener)
public void removeMessageListener(MessageListener listener)
public void addMessageListener(java.lang.Class messageClass, MessageListener listener)
public void removeMessageListener(java.lang.Class messageClass, MessageListener listener)
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |