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.StringgetName()java.lang.StringgetProviderName()java.lang.Class<? extends IoSessionConfig>getSessionConfigType()booleanhasFragmentation()booleanisConnectionless()java.lang.StringtoString()
-
-
-
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:
getAddressTypein interfaceTransportMetadata- Returns:
- the address type of the service.
-
getEnvelopeTypes
public java.util.Set<java.lang.Class<? extends java.lang.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 java.lang.Class<? extends IoSessionConfig> getSessionConfigType()
- Specified by:
getSessionConfigTypein interfaceTransportMetadata- Returns:
- the type of the
IoSessionConfigof the service
-
getProviderName
public java.lang.String getProviderName()
- Specified by:
getProviderNamein interfaceTransportMetadata- Returns:
- the name of the service provider (e.g. "nio", "apr" and "rxtx").
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceTransportMetadata- Returns:
- the name of the service.
-
isConnectionless
public boolean isConnectionless()
- Specified by:
isConnectionlessin interfaceTransportMetadata- Returns:
- true if 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-