Tabnine Logo
org.jboss.marshalling
Code IndexAdd Tabnine to your IDE (free)

How to use org.jboss.marshalling

Best Java code snippets using org.jboss.marshalling (Showing top 20 results out of 423)

origin: netty/netty

@Override
public Marshaller getMarshaller(ChannelHandlerContext ctx) throws Exception {
  return factory.createMarshaller(config);
}
origin: netty/netty

@Override
public Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws Exception {
  return factory.createUnmarshaller(config);
}
origin: wildfly/wildfly

  public void writeObject(final Marshaller marshaller, final Object obj) throws IOException {
    marshaller.writeByte(idx);
    objectTable.getObjectWriter(obj).writeObject(marshaller, obj);
  }
}));
origin: wildfly/wildfly

public static Unmarshaller createUnmarshaller(MessageInputStream is, MarshallingConfiguration configuration) throws IOException {
  final Unmarshaller unmarshaller = riverMarshallerFactory.createUnmarshaller(configuration);
  unmarshaller.start(Marshalling.createByteInput(is));
  return unmarshaller;
}
origin: wildfly/wildfly

public static Marshaller createMarshaller(MessageOutputStream os, MarshallingConfiguration configuration) throws IOException {
  final Marshaller marshaller = riverMarshallerFactory.createMarshaller(configuration);
  marshaller.start(new OutputStreamByteOutput(os) {
    @Override
    public void flush() throws IOException {
      //ignore flushes, all they do is wreck performance as you get a double flush when closing the marshaller
      //which results in two network packets being sent
    }
  });
  return marshaller;
}
origin: wildfly/wildfly

RemoteServerTransport(final Channel channel, final int version, final MessageTracker messageTracker, final Context localContext) {
  this.channel = channel;
  this.version = version;
  this.messageTracker = messageTracker;
  this.localContext = localContext;
  this.configuration = new MarshallingConfiguration();
  configuration.setVersion(version == 2 ? 4 : 2);
  configuration.setClassResolver(new ContextClassResolver());
}
origin: wildfly/wildfly

StepObjectOutput(final Queue<Step> steps) throws IOException {
  super(SerializingCloner.this.bufferSize);
  this.steps = steps;
  super.start(Marshalling.createByteOutput(byteArrayOutputStream));
}
origin: wildfly/wildfly

  public void writeClass(final Marshaller marshaller, final Class<?> clazz) throws IOException {
    marshaller.writeByte(idx);
    classTable.getClassWriter(clazz).writeClass(marshaller, clazz);
  }
}));
origin: wildfly/wildfly

/** {@inheritDoc} */
public Writer getObjectWriter(final Object obj) throws IOException {
  for (Pair<ObjectTable, Writer> entry : writers) {
    final ObjectTable table = entry.getA();
    final Writer writer = entry.getB();
    if (table.getObjectWriter(obj) != null) {
      return writer;
    }
  }
  return null;
}
origin: netty/netty

@Override
public int read(byte[] array, int offset, int length) throws IOException {
  int readable = readable(length);
  if (readable > 0) {
    int i = input.read(array, offset, readable);
    read += i;
    return i;
  } else {
    throw EXCEPTION;
  }
}
origin: netty/netty

@Override
public long skip(long bytes) throws IOException {
  int readable = readable((int) bytes);
  if (readable > 0) {
    long i = input.skip(readable);
    read += i;
    return i;
  } else {
    throw EXCEPTION;
  }
}
origin: netty/netty

@Override
public int available() throws IOException {
  return readable(input.available());
}
origin: wildfly/wildfly

  /**
   * {@inheritDoc}
   */
  public void close() throws IOException {
    flush();
    byteOutput.close();
  }
}
origin: wildfly/wildfly

/**
 * Add information about a field which was being marshalled.
 *
 * @param t the throwable to update
 * @param fieldName the field name being (un-)marshalled
 */
public static void addFieldInformation(Throwable t, String fieldName) {
  final TraceInformation ti = getOrAddTraceInformation(t);
  final Info oldInfo = ti.info;
  ti.info = new FieldInfo(oldInfo, fieldName);
}
origin: wildfly/wildfly

/** {@inheritDoc} */
public void finish() throws IOException {
  try {
    super.finish();
  } finally {
    clearClassCache();
  }
}
origin: redisson/redisson

@Override
public Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws Exception {
  return factory.createUnmarshaller(config);
}
origin: redisson/redisson

@Override
public Marshaller getMarshaller(ChannelHandlerContext ctx) throws Exception {
  return factory.createMarshaller(config);
}
origin: netty/netty

@Override
public int read() throws IOException {
  int readable = readable(1);
  if (readable > 0) {
    int b = input.read();
    read++;
    return b;
  } else {
    throw EXCEPTION;
  }
}
origin: netty/netty

@Override
public Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws Exception {
  Unmarshaller unmarshaller = unmarshallers.get();
  if (unmarshaller == null) {
    unmarshaller = factory.createUnmarshaller(config);
    unmarshallers.set(unmarshaller);
  }
  return unmarshaller;
}
origin: netty/netty

  @Override
  public Marshaller getMarshaller(ChannelHandlerContext ctx) throws Exception {
    Marshaller marshaller = marshallers.get();
    if (marshaller == null) {
      marshaller = factory.createMarshaller(config);
      marshallers.set(marshaller);
    }
    return marshaller;
  }
}
org.jboss.marshalling

Most used classes

  • Unmarshaller
    An unmarshaller which reads objects from a stream.
  • Marshaller
    An object marshaller for writing objects to byte streams.
  • MarshallerFactory
    The main marshaller factory.
  • MarshallingConfiguration
    A Marshaller configuration.
  • Marshalling
    Static utility methods for simplifying use of marshallers.
  • ModularClassResolver,
  • SerializableClassRegistry,
  • InputStreamByteInput,
  • SerializabilityChecker,
  • IdentityIntMap,
  • ByteOutput,
  • ClassExternalizerFactory,
  • SimpleDataInput,
  • SimpleDataOutput,
  • ObjectResolver,
  • ObjectTable,
  • OutputStreamByteOutput,
  • TraceInformation,
  • AbstractMarshaller
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now