Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.common
Class TransportType

    java.lang.Object
      org.apache.mina.common.TransportType

All Implemented Interfaces:
  Serializable

    public final class TransportType

extends Object
implements Serializable

Represents network transport types. MINA provides three transport types by default:

- `SOCKET` - TCP/IP
- `DATAGRAM` - UDP/IP
- `VM_PIPE` - in-VM pipe support (only available in protocol layer

You can also create your own transport type. Please refer to `TransportType(String[], boolean)`.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 12:19:00 +0900 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)
See Also:
  Serialized Form

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
Constructor Summary
`TransportType(String[] names, boolean connectionless)` Creates a new instance.
`TransportType(String[] names, Class<? extends Object> envelopeType, boolean connectionless)` Creates a new instance.
Method Summary
`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()`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`
Field Detail
### SOCKET
    public static final TransportType SOCKET
Transport type: TCP/IP (Registry name: `"SOCKET"` or `"TCP"`) ### DATAGRAM
    public static final TransportType DATAGRAM
Transport type: UDP/IP (Registry name: `"DATAGRAM"` or `"UDP"`) ### VM_PIPE
    public static final TransportType VM_PIPE
Transport type: in-VM pipe (Registry name: `"VM_PIPE"`) Please refer to `org.apache.mina.protocol.vmpipe` package.
Constructor Detail
### TransportType
    public TransportType(String[] names,
                         boolean connectionless)
Creates a new instance. New transport type is automatically registered to internal registry so that you can look it up using `getInstance(String)`. Parameters: `names` - the name or aliases of this transport type `connectionless` - `true` if and only if this transport type is connectionless Throws: `IllegalArgumentException` - if `names` are already registered or empty ### TransportType
    public TransportType(String[] names,
                         Class<? extends Object> envelopeType,
                         boolean connectionless)
Creates a new instance. New transport type is automatically registered to internal registry so that you can look it up using `getInstance(String)`. Parameters: `names` - the name or aliases of this transport type `connectionless` - `true` if and only if this transport type is connectionless Throws: `IllegalArgumentException` - if `names` are already registered or empty
Method Detail
### getInstance
    public static TransportType getInstance(String name)
Returns the transport type of the specified name. All names are case-insensitive. Parameters: `name` - the name of the transport type Returns: the transport type Throws: `IllegalArgumentException` - if the specified name is not available. ### isConnectionless
    public boolean isConnectionless()
Returns `true` if the session of this transport type is connectionless. ### getEnvelopeType
    public Class<? extends Object> getEnvelopeType()
### getNames
    public Set<String> getNames()
Returns the known names of this transport type. ### toString
    public String toString()
Overrides: `toString` in class `Object`
Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.