public final class TransportType extends Object implements Serializable
You can also create your own transport type. Please refer to
TransportType(String[], boolean).
| Modifier and Type | Field and Description |
|---|---|
static TransportType |
DATAGRAM
Transport type: UDP/IP (Registry name: "DATAGRAM" or "UDP")
|
static TransportType |
SOCKET
Transport type: TCP/IP (Registry name: "SOCKET" or "TCP")
|
static TransportType |
VM_PIPE
Transport type: in-VM pipe (Registry name: "VM_PIPE")
Please refer to
org.apache.mina.protocol.vmpipe
package.
|
| Constructor and Description |
|---|
TransportType(String[] names,
boolean connectionless)
Creates a new instance.
|
TransportType(String[] names,
Class<? extends Object> envelopeType,
boolean connectionless)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends Object> |
getEnvelopeType() |
static TransportType |
getInstance(String name)
Returns the transport type of the specified name.
|
Set<String> |
getNames()
Returns the known names of this transport type.
|
boolean |
isConnectionless()
Returns
true if the session of this transport type is
connectionless. |
String |
toString() |
public static final TransportType SOCKET
public static final TransportType DATAGRAM
public static final TransportType VM_PIPE
public TransportType(String[] names, boolean connectionless)
getInstance(String).names - the name or aliases of this transport typeconnectionless - true if and only if this transport type is connectionlessIllegalArgumentException - if names are already registered or emptypublic TransportType(String[] names, Class<? extends Object> envelopeType, boolean connectionless)
getInstance(String).names - the name or aliases of this transport typeconnectionless - true if and only if this transport type is connectionlessIllegalArgumentException - if names are already registered or emptypublic static TransportType getInstance(String name)
name - the name of the transport typeIllegalArgumentException - if the specified name is not available.public boolean isConnectionless()
true if the session of this transport type is
connectionless.Copyright © 2004–2018 Apache MINA Project. All rights reserved.