org.apache.mina.core.service

## Class DefaultTransportMetadata

- java.lang.Object
- - org.apache.mina.core.service.DefaultTransportMetadata

- All Implemented Interfaces:
    TransportMetadata

      public class DefaultTransportMetadata
      extends Object
      implements TransportMetadata

  A default immutable implementation of `TransportMetadata`.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultTransportMetadata(String providerName, String name, boolean connectionless, boolean fragmentation, Class<? extends SocketAddress> addressType, Class<? extends IoSessionConfig> sessionConfigType, Class<?>... envelopeTypes)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Class<? extends SocketAddress>` | `getAddressType()` Returns the address type of the service.
    `Set<Class<? extends Object>>` | `getEnvelopeTypes()` Returns the set of the allowed message type when you write to an `IoSession` that is managed by the service.
    `String` | `getName()` Returns the name of the service.
    `String` | `getProviderName()` Returns the name of the service provider (e.g.
    `Class<? extends IoSessionConfig>` | `getSessionConfigType()` Returns the type of the `IoSessionConfig` of the service
    `boolean` | `hasFragmentation()` Returns `true` if the messages exchanged by the service can be fragmented or reassembled by its underlying transport.
    `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`

- - ### Constructor Detail

    - #### DefaultTransportMetadata

          public DefaultTransportMetadata(String providerName,
                                  String name,
                                  boolean connectionless,
                                  boolean fragmentation,
                                  Class<? extends SocketAddress> addressType,
                                  Class<? extends IoSessionConfig> sessionConfigType,
                                  Class<?>... envelopeTypes)

  - ### Method Detail

    - #### getAddressType

          public Class<? extends SocketAddress> getAddressType()

      Description copied from interface: `TransportMetadata`
      Returns the address type of the service.
      Specified by:
        `getAddressType` in interface `TransportMetadata`

    - #### getEnvelopeTypes

          public Set<Class<? extends Object>> getEnvelopeTypes()

      Description copied from interface: `TransportMetadata`
      Returns the set of the allowed message type when you write to an `IoSession` that is managed by the service.
      Specified by:
        `getEnvelopeTypes` in interface `TransportMetadata`

    - #### getSessionConfigType

          public Class<? extends IoSessionConfig> getSessionConfigType()

      Description copied from interface: `TransportMetadata`
      Returns the type of the `IoSessionConfig` of the service
      Specified by:
        `getSessionConfigType` in interface `TransportMetadata`

    - #### getProviderName

          public String getProviderName()

      Description copied from interface: `TransportMetadata`
      Returns the name of the service provider (e.g. "nio", "apr" and "rxtx").
      Specified by:
        `getProviderName` in interface `TransportMetadata`

    - #### getName

          public String getName()

      Description copied from interface: `TransportMetadata`
      Returns the name of the service.
      Specified by:
        `getName` in interface `TransportMetadata`

    - #### isConnectionless

          public boolean isConnectionless()

      Description copied from interface: `TransportMetadata`
      Returns `true` if the session of this transport type is connectionless.
      Specified by:
        `isConnectionless` in interface `TransportMetadata`

    - #### hasFragmentation

          public boolean hasFragmentation()

      Description copied from interface: `TransportMetadata`
      Returns `true` if the messages exchanged by the service can be fragmented or reassembled by its underlying transport.
      Specified by:
        `hasFragmentation` in interface `TransportMetadata`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.