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 Object implements TransportMetadata
A default immutable implementation ofTransportMetadata.- Author:
- Apache MINA Project
-
-
Constructor Summary
Constructors Constructor Description DefaultTransportMetadata(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends SocketAddress>getAddressType()Set<Class<? extends Object>>getEnvelopeTypes()StringgetName()StringgetProviderName()Class<? extends IoSessionConfig>getSessionConfigType()booleanhasFragmentation()booleanisConnectionless()StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
getAddressType
public Class<? extends SocketAddress> getAddressType()
- Specified by:
getAddressTypein interfaceTransportMetadata- Returns:
- the address type of the service.
-
getEnvelopeTypes
public Set<Class<? extends Object>> 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
public Class<? extends IoSessionConfig> getSessionConfigType()
- Specified by:
getSessionConfigTypein interfaceTransportMetadata- Returns:
- the type of the
IoSessionConfigof the service
-
getProviderName
public String getProviderName()
- Specified by:
getProviderNamein interfaceTransportMetadata- Returns:
- the name of the service provider (e.g. "nio", "apr" and "rxtx").
-
getName
public String 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.
-
-