Class DefaultTransportMetadata
java.lang.Object
org.apache.mina.core.service.DefaultTransportMetadata
- All Implemented Interfaces:
TransportMetadata
A default immutable implementation of
TransportMetadata.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<? extends SocketAddress> private final booleanprivate final booleanThe flag indicating that the transport support fragmentation or notprivate final Stringprivate final Stringprivate final Class<? extends IoSessionConfig> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTransportMetadata(String providerName, String name, boolean connectionless, boolean fragmentation, Class<? extends SocketAddress> addressType, Class<? extends IoSessionConfig> sessionConfigType, Class<?>... envelopeTypes) Creates a new DefaultTransportMetadata instance -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends SocketAddress> getName()Class<? extends IoSessionConfig> booleanbooleantoString()
-
Field Details
-
providerName
-
name
-
connectionless
private final boolean connectionless -
fragmentation
private final boolean fragmentationThe flag indicating that the transport support fragmentation or not -
addressType
-
sessionConfigType
-
envelopeTypes
-
-
Constructor Details
-
DefaultTransportMetadata
public DefaultTransportMetadata(String providerName, String name, boolean connectionless, boolean fragmentation, Class<? extends SocketAddress> addressType, Class<? extends IoSessionConfig> sessionConfigType, Class<?>... envelopeTypes) Creates a new DefaultTransportMetadata instance- Parameters:
providerName- The provider namename- The nameconnectionless- If the transport is UDPfragmentation- If fragmentation is supportedaddressType- The address type (IP V4 or IPV6)sessionConfigType- The session configuration typeenvelopeTypes- The types of supported messages
-
-
Method Details
-
getAddressType
- Specified by:
getAddressTypein interfaceTransportMetadata- Returns:
- the address type of the service.
-
getEnvelopeTypes
- Specified by:
getEnvelopeTypesin interfaceTransportMetadata- Returns:
- the set of the allowed message type when you write to an
IoSessionthat is managed by the service.
-
getSessionConfigType
- Specified by:
getSessionConfigTypein interfaceTransportMetadata- Returns:
- the type of the
IoSessionConfigof the service
-
getProviderName
- Specified by:
getProviderNamein interfaceTransportMetadata- Returns:
- the name of the service provider (e.g. "nio", "apr" and "rxtx").
-
getName
- Specified by:
getNamein interfaceTransportMetadata- Returns:
- the name of the service.
-
isConnectionless
public boolean isConnectionless()- Specified by:
isConnectionlessin interfaceTransportMetadata- Returns:
trueif the session of this transport type is connectionless.
-
hasFragmentation
public boolean hasFragmentation()- Specified by:
hasFragmentationin interfaceTransportMetadata- Returns:
trueif the messages exchanged by the service can be fragmented or reassembled by its underlying transport.
-
toString
-