Interface MarshallingConfigurationRepository
public interface MarshallingConfigurationRepository
Repository of versioned
MarshallingConfigurations.- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionfrom(int currentVersion, org.jboss.marshalling.MarshallingConfiguration... configurations) Creates a marshalling configuration repository from on an enumeration of configuration factories.static <C, E extends Enum<E> & Function<C, org.jboss.marshalling.MarshallingConfiguration>>
MarshallingConfigurationRepositoryfrom(E current, C context) Creates a marshalling configuration repository from on an enumeration of configuration factories.from(org.jboss.marshalling.MarshallingConfiguration... configurations) Creates a marshalling configuration repository from the specified ordered configurations.org.jboss.marshalling.MarshallingConfigurationReturns the marshalling configuration for the current version.intReturns the current marshalling configuration version.org.jboss.marshalling.MarshallingConfigurationgetMarshallingConfiguration(int version) Returns the marshalling configuration for the specified version.
-
Method Details
-
getCurrentVersion
int getCurrentVersion()Returns the current marshalling configuration version.- Returns:
- a version
-
getCurrentMarshallingConfiguration
org.jboss.marshalling.MarshallingConfiguration getCurrentMarshallingConfiguration()Returns the marshalling configuration for the current version.- Returns:
- a marshalling configuration
-
getMarshallingConfiguration
org.jboss.marshalling.MarshallingConfiguration getMarshallingConfiguration(int version) throws IOException Returns the marshalling configuration for the specified version.- Parameters:
version- a version- Returns:
- a marshalling configuration
- Throws:
IOException- if the specified version is unknown
-
from
static <C, E extends Enum<E> & Function<C, org.jboss.marshalling.MarshallingConfiguration>> MarshallingConfigurationRepository from(E current, C context) Creates a marshalling configuration repository from on an enumeration of configuration factories.- Type Parameters:
C- the marshalling contextE- the enum type- Parameters:
current- the current versioncontext- the marshalling context- Returns:
- a marshalling configuration repository
-
from
static MarshallingConfigurationRepository from(org.jboss.marshalling.MarshallingConfiguration... configurations) Creates a marshalling configuration repository from the specified ordered configurations.- Parameters:
configurations- a number of configurations- Returns:
- a marshalling configuration repository
-
from
static MarshallingConfigurationRepository from(int currentVersion, org.jboss.marshalling.MarshallingConfiguration... configurations) Creates a marshalling configuration repository from on an enumeration of configuration factories.- Parameters:
currentVersion- the current versionconfigurations- a number of marshalling configurations- Returns:
- a marshalling configuration repository
-