本文整理了Java中org.jboss.marshalling.Marshalling.getProvidedMarshallerFactory()
方法的一些代码示例,展示了Marshalling.getProvidedMarshallerFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marshalling.getProvidedMarshallerFactory()
方法的具体详情如下:
包路径:org.jboss.marshalling.Marshalling
类名称:Marshalling
方法名:getProvidedMarshallerFactory
[英]Get a marshaller factory which is visible to this implementation, by name. Uses the class loader of this API.
[中]按名称获取此实现可见的封送处理程序工厂。使用此API的类加载器。
代码示例来源:origin: wildfly/wildfly
Common(Channel channel) {
marshallerFactory = Marshalling.getProvidedMarshallerFactory(MARSHALLING_STRATEGY);
if (marshallerFactory == null) {
throw new RuntimeException("Could not find a marshaller factory for " + MARSHALLING_STRATEGY
+ " marshalling strategy");
}
this.channel = channel;
}
代码示例来源:origin: wildfly/wildfly
Common(Channel channel) {
marshallerFactory = Marshalling.getProvidedMarshallerFactory(MARSHALLING_STRATEGY);
if (marshallerFactory == null) {
throw new RuntimeException("Could not find a marshaller factory for " + MARSHALLING_STRATEGY
+ " marshalling strategy");
}
this.channel = channel;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
Common(Channel channel) {
marshallerFactory = Marshalling.getProvidedMarshallerFactory(MARSHALLING_STRATEGY);
if (marshallerFactory == null) {
throw new RuntimeException("Could not find a marshaller factory for " + MARSHALLING_STRATEGY
+ " marshalling strategy");
}
this.channel = channel;
}
代码示例来源:origin: org.jboss.remotingjmx/remoting-jmx
Common(Channel channel) {
marshallerFactory = Marshalling.getProvidedMarshallerFactory(MARSHALLING_STRATEGY);
if (marshallerFactory == null) {
throw new RuntimeException("Could not find a marshaller factory for " + MARSHALLING_STRATEGY
+ " marshalling strategy");
}
this.channel = channel;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
Common(Channel channel) {
marshallerFactory = Marshalling.getProvidedMarshallerFactory(MARSHALLING_STRATEGY);
if (marshallerFactory == null) {
throw new RuntimeException("Could not find a marshaller factory for " + MARSHALLING_STRATEGY
+ " marshalling strategy");
}
this.channel = channel;
}
代码示例来源:origin: org.jboss.remotingjmx/remoting-jmx
Common(Channel channel) {
marshallerFactory = Marshalling.getProvidedMarshallerFactory(MARSHALLING_STRATEGY);
if (marshallerFactory == null) {
throw new RuntimeException("Could not find a marshaller factory for " + MARSHALLING_STRATEGY
+ " marshalling strategy");
}
this.channel = channel;
}
代码示例来源:origin: org.jboss.remoting3/remoting-jmx
Common(Channel channel) {
marshallerFactory = Marshalling.getProvidedMarshallerFactory(MARSHALLING_STRATEGY);
if (marshallerFactory == null) {
throw new RuntimeException("Could not find a marshaller factory for " + MARSHALLING_STRATEGY
+ " marshalling strategy");
}
this.channel = channel;
}
代码示例来源:origin: org.jboss.as/jboss-as-ejb3
private MarshallerFactory getMarshallerFactory(final String marshallerStrategy) {
final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory(marshallerStrategy);
if (marshallerFactory == null) {
throw EjbMessages.MESSAGES.failedToFindMarshallerFactoryForStrategy(marshallerStrategy);
}
return marshallerFactory;
}
}
代码示例来源:origin: wuyinxian124/nettybook2
/**
* 创建Jboss Marshaller
*
* @return
* @throws IOException
*/
protected static Marshaller buildMarshalling() throws IOException {
final MarshallerFactory marshallerFactory = Marshalling
.getProvidedMarshallerFactory("serial");
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
Marshaller marshaller = marshallerFactory
.createMarshaller(configuration);
return marshaller;
}
代码示例来源:origin: wuyinxian124/nettybook2
/**
* 创建Jboss Unmarshaller
*
* @return
* @throws IOException
*/
protected static Unmarshaller buildUnMarshalling() throws IOException {
final MarshallerFactory marshallerFactory = Marshalling
.getProvidedMarshallerFactory("serial");
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
final Unmarshaller unmarshaller = marshallerFactory
.createUnmarshaller(configuration);
return unmarshaller;
}
}
代码示例来源:origin: wuyinxian124/nettybook2
/**
* 创建Jboss Marshalling解码器MarshallingDecoder
*
* @return
*/
public static MarshallingDecoder buildMarshallingDecoder() {
final MarshallerFactory marshallerFactory = Marshalling
.getProvidedMarshallerFactory("serial");
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
UnmarshallerProvider provider = new DefaultUnmarshallerProvider(
marshallerFactory, configuration);
MarshallingDecoder decoder = new MarshallingDecoder(provider, 1024);
return decoder;
}
代码示例来源:origin: net.oschina.durcframework/easyopen
/**
* 创建Jboss Marshalling编码器MarshallingEncoder
* @return MarshallingEncoder
*/
public static MarshallingEncoder buildMarshallingEncoder() {
final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
MarshallerProvider provider = new DefaultMarshallerProvider(marshallerFactory, configuration);
//构建Netty的MarshallingEncoder对象,MarshallingEncoder用于实现序列化接口的POJO对象序列化为二进制数组
MarshallingEncoder encoder = new MarshallingEncoder(provider);
return encoder;
}
代码示例来源:origin: wuyinxian124/nettybook2
/**
* 创建Jboss Marshalling编码器MarshallingEncoder
*
* @return
*/
public static MarshallingEncoder buildMarshallingEncoder() {
final MarshallerFactory marshallerFactory = Marshalling
.getProvidedMarshallerFactory("serial");
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
MarshallerProvider provider = new DefaultMarshallerProvider(
marshallerFactory, configuration);
MarshallingEncoder encoder = new MarshallingEncoder(provider);
return encoder;
}
}
代码示例来源:origin: net.oschina.durcframework/easyopen
/**
* 创建Jboss Marshalling解码器MarshallingDecoder
* @return MarshallingDecoder
*/
public static MarshallingDecoder buildMarshallingDecoder() {
//首先通过Marshalling工具类的精通方法获取Marshalling实例对象 参数serial标识创建的是java序列化工厂对象。
final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
//创建了MarshallingConfiguration对象,配置了版本号为5
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
//根据marshallerFactory和configuration创建provider
UnmarshallerProvider provider = new DefaultUnmarshallerProvider(marshallerFactory, configuration);
//构建Netty的MarshallingDecoder对象,俩个参数分别为provider和单个消息序列化后的最大长度
MarshallingDecoder decoder = new MarshallingDecoder(provider, Integer.MAX_VALUE);
return decoder;
}
内容来源于网络,如有侵权,请联系作者删除!