mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jcduff
23.04.2008 f73b655466092169abac34833fb628fce1fcdebe
opends/src/server/org/opends/server/replication/protocol/TLSSocketSession.java
@@ -118,10 +118,19 @@
  /**
   * {@inheritDoc}
   */
  public synchronized void publish(ReplicationMessage msg)
  public synchronized void publish(ReplicationMsg msg)
         throws IOException
  {
    byte[] buffer = msg.getBytes();
    publish(msg, ProtocolVersion.getCurrentVersion());
  }
  /**
   * {@inheritDoc}
   */
  public synchronized void publish(ReplicationMsg msg, short reqProtocolVersion)
         throws IOException
  {
    byte[] buffer = msg.getBytes(reqProtocolVersion);
    String str = String.format("%08x", buffer.length);
    byte[] sendLengthBuf = str.getBytes();
@@ -135,8 +144,9 @@
  /**
   * {@inheritDoc}
   */
  public ReplicationMessage receive() throws IOException,
      ClassNotFoundException, DataFormatException
  public ReplicationMsg receive() throws IOException,
      ClassNotFoundException, DataFormatException,
      NotSupportedOldVersionPDUException
  {
    /* Read the first 8 bytes containing the packet length */
    int length = 0;
@@ -172,7 +182,7 @@
      /* We do not want the heartbeat to close the session when */
      /* we are processing a message even a time consuming one. */
      lastReceiveTime=0;
      return ReplicationMessage.generateMsg(buffer);
      return ReplicationMsg.generateMsg(buffer);
    }
    catch (OutOfMemoryError e)
    {