|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.mina.common.TransportType
public final class TransportType
Represents network transport types. MINA provides three transport types by default:
You can also create your own transport type. Please refer to
TransportType(String[], boolean).
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
TransportType(java.lang.String[] names,
boolean connectionless)
Creates a new instance. |
|
TransportType(java.lang.String[] names,
java.lang.Class<? extends java.lang.Object> envelopeType,
boolean connectionless)
Creates a new instance. |
|
| Method Summary | |
|---|---|
java.lang.Class<? extends java.lang.Object> |
getEnvelopeType()
|
static TransportType |
getInstance(java.lang.String name)
Returns the transport type of the specified name. |
java.util.Set<java.lang.String> |
getNames()
Returns the known names of this transport type. |
boolean |
isConnectionless()
Returns true if the session of this transport type is
connectionless. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TransportType SOCKET
public static final TransportType DATAGRAM
public static final TransportType VM_PIPE
| Constructor Detail |
|---|
public TransportType(java.lang.String[] names,
boolean connectionless)
getInstance(String).
names - the name or aliases of this transport typeconnectionless - true if and only if this transport type is connectionless
java.lang.IllegalArgumentException - if names are already registered or empty
public TransportType(java.lang.String[] names,
java.lang.Class<? extends java.lang.Object> envelopeType,
boolean connectionless)
getInstance(String).
names - the name or aliases of this transport typeconnectionless - true if and only if this transport type is connectionless
java.lang.IllegalArgumentException - if names are already registered or empty| Method Detail |
|---|
public static TransportType getInstance(java.lang.String name)
name - the name of the transport type
java.lang.IllegalArgumentException - if the specified name is not available.public boolean isConnectionless()
true if the session of this transport type is
connectionless.
public java.lang.Class<? extends java.lang.Object> getEnvelopeType()
public java.util.Set<java.lang.String> getNames()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||