Package org.apache.mina.core.service
Class DefaultTransportMetadata
- java.lang.Object
-
- org.apache.mina.core.service.DefaultTransportMetadata
-
- All Implemented Interfaces:
TransportMetadata
public class DefaultTransportMetadata extends java.lang.Object implements TransportMetadata
A default immutable implementation ofTransportMetadata
.- Author:
- Apache MINA Project
-
-
Constructor Summary
Constructors Constructor Description DefaultTransportMetadata(java.lang.String providerName, java.lang.String name, boolean connectionless, boolean fragmentation, java.lang.Class<? extends java.net.SocketAddress> addressType, java.lang.Class<? extends IoSessionConfig> sessionConfigType, java.lang.Class<?>... envelopeTypes)
Creates a new DefaultTransportMetadata instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends java.net.SocketAddress>
getAddressType()
java.util.Set<java.lang.Class<? extends java.lang.Object>>
getEnvelopeTypes()
java.lang.String
getName()
java.lang.String
getProviderName()
java.lang.Class<? extends IoSessionConfig>
getSessionConfigType()
boolean
hasFragmentation()
boolean
isConnectionless()
java.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultTransportMetadata
public DefaultTransportMetadata(java.lang.String providerName, java.lang.String name, boolean connectionless, boolean fragmentation, java.lang.Class<? extends java.net.SocketAddress> addressType, java.lang.Class<? extends IoSessionConfig> sessionConfigType, java.lang.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 Detail
-
getAddressType
public java.lang.Class<? extends java.net.SocketAddress> getAddressType()
- Specified by:
getAddressType
in interfaceTransportMetadata
- Returns:
- the address type of the service.
-
getEnvelopeTypes
public java.util.Set<java.lang.Class<? extends java.lang.Object>> getEnvelopeTypes()
- Specified by:
getEnvelopeTypes
in interfaceTransportMetadata
- Returns:
- the set of the allowed message type when you write to an
IoSession
that is managed by the service.
-
getSessionConfigType
public java.lang.Class<? extends IoSessionConfig> getSessionConfigType()
- Specified by:
getSessionConfigType
in interfaceTransportMetadata
- Returns:
- the type of the
IoSessionConfig
of the service
-
getProviderName
public java.lang.String getProviderName()
- Specified by:
getProviderName
in interfaceTransportMetadata
- Returns:
- the name of the service provider (e.g. "nio", "apr" and "rxtx").
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceTransportMetadata
- Returns:
- the name of the service.
-
isConnectionless
public boolean isConnectionless()
- Specified by:
isConnectionless
in interfaceTransportMetadata
- Returns:
- true if the session of this transport type is connectionless.
-
hasFragmentation
public boolean hasFragmentation()
- Specified by:
hasFragmentation
in interfaceTransportMetadata
- Returns:
true
if the messages exchanged by the service can be fragmented or reassembled by its underlying transport.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-