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()
String
getName()
String
getProviderName()
Class<? extends IoSessionConfig>
getSessionConfigType()
boolean
hasFragmentation()
boolean
isConnectionless()
String
toString()
-
-
-
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:
getAddressType
in interfaceTransportMetadata
- Returns:
- the address type of the service.
-
getEnvelopeTypes
public Set<Class<? extends 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 Class<? extends IoSessionConfig> getSessionConfigType()
- Specified by:
getSessionConfigType
in interfaceTransportMetadata
- Returns:
- the type of the
IoSessionConfig
of the service
-
getProviderName
public String getProviderName()
- Specified by:
getProviderName
in interfaceTransportMetadata
- Returns:
- the name of the service provider (e.g. "nio", "apr" and "rxtx").
-
getName
public 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.
-
-