Package com.wowza.io

Class HTTPByteWriter

Object
com.wowza.io.HTTPByteWriter

public class HTTPByteWriter extends Object
  • Field Details

    • CLASSNAME

      protected String CLASSNAME
    • CLASS

      protected Class<? extends HTTPByteWriter> CLASS
    • MAXHEADERSIZE

      public static final int MAXHEADERSIZE
      See Also:
    • BUFFERINCSIZE

      public static final int BUFFERINCSIZE
      See Also:
    • READWRITETIMEOUT

      public static final int READWRITETIMEOUT
      See Also:
    • CONNECTIONTIMEOUT

      public static final int CONNECTIONTIMEOUT
      See Also:
    • SENDBUFFERSIZE

      public static final int SENDBUFFERSIZE
      See Also:
    • RECEIVEBUFFERSIZE

      public static final int RECEIVEBUFFERSIZE
      See Also:
    • MAXRETRIES

      public static final int MAXRETRIES
      See Also:
    • RETRYWAITTIME

      public static final long RETRYWAITTIME
      See Also:
    • CRLF

      public static final String CRLF
      See Also:
    • HEADINDEX_STATUS

      public static final int HEADINDEX_STATUS
      See Also:
    • HEADINDEX_CONTENTLENGTH

      public static final int HEADINDEX_CONTENTLENGTH
      See Also:
    • HEADINDEX_LASTMODIFIED

      public static final int HEADINDEX_LASTMODIFIED
      See Also:
    • HEADINDEX_SIZE

      public static final int HEADINDEX_SIZE
      See Also:
    • LOG_QUIET

      public static final int LOG_QUIET
      See Also:
    • LOG_TIMEOUTS

      public static final int LOG_TIMEOUTS
      See Also:
    • LOG_DEBUG

      public static final int LOG_DEBUG
      See Also:
    • LOG_FRAGMENTS

      public static final int LOG_FRAGMENTS
      See Also:
    • LOG_DNS

      public static final int LOG_DNS
      See Also:
    • LOG_REQHEADERS

      public static final int LOG_REQHEADERS
      See Also:
    • LOG_ALL

      public static final int LOG_ALL
      See Also:
    • LOG_DEFAULT

      public static final int LOG_DEFAULT
      See Also:
    • host

      protected String host
    • port

      protected int port
    • reqPath

      protected String reqPath
    • proxyHost

      protected String proxyHost
    • proxyPort

      protected int proxyPort
    • dateFormat

      protected org.apache.commons.lang3.time.FastDateFormat dateFormat
    • socket

      protected Socket socket
    • socketChannel

      protected SocketChannel socketChannel
    • msgBuf

      protected StringBuffer msgBuf
    • maxRetries

      protected int maxRetries
    • maxUsesBeforeReconnect

      protected int maxUsesBeforeReconnect
    • retryTimeout

      protected long retryTimeout
    • uses

      protected int uses
    • readWriteTimeout

      protected int readWriteTimeout
    • connectionTimeout

      protected int connectionTimeout
    • debugInfo

      protected List<String> debugInfo
    • debugPrefix

      protected String debugPrefix
    • requestFullURL

      protected boolean requestFullURL
    • parseDateFormats

      protected String[] parseDateFormats
    • sendBufferSize

      protected int sendBufferSize
    • receiveBufferSize

      protected int receiveBufferSize
    • userAgent

      protected String userAgent
    • nonblocked

      protected Boolean nonblocked
    • logOptions

      protected int logOptions
    • addrIdx

      protected int addrIdx
    • isSSL

      protected boolean isSSL
  • Constructor Details

    • HTTPByteWriter

      public HTTPByteWriter(String host, int port, Boolean nonblocked)
  • Method Details

    • getConnectionTimeout

      public int getConnectionTimeout()
    • setConnectionTimeout

      public void setConnectionTimeout(int connectionTimeout)
    • getRetryTimeout

      public long getRetryTimeout()
    • setRetryTimeout

      public void setRetryTimeout(long timeout)
    • getSendBufferSize

      public int getSendBufferSize()
    • setSendBufferSize

      public void setSendBufferSize(int sendBufferSize)
    • getReceiveBufferSize

      public int getReceiveBufferSize()
    • setReceiveBufferSize

      public void setReceiveBufferSize(int receiveBufferSize)
    • getUserAgent

      public String getUserAgent()
    • setUserAgent

      public void setUserAgent(String userAgent)
    • getLogOptions

      public int getLogOptions()
    • setLogOptions

      public void setLogOptions(int options)
    • addLogOptions

      public void addLogOptions(int options)
    • removeLogOptions

      public void removeLogOptions(int options)
    • isLogOption

      public boolean isLogOption(int option)
    • setIsSSL

      public void setIsSSL(boolean ssl)
    • getIsSSL

      public boolean getIsSSL()
    • setProxyAddress

      public void setProxyAddress(String host, int port)
    • close

      public void close()
    • connect

      public void connect()
    • reconnect

      protected void reconnect()
    • isOpen

      public boolean isOpen()
    • parseHeader

      protected void parseHeader(HTTPByteWriter.SendResult result, byte[] buffer, int offset, int len, boolean isHead)
    • delete

      public HTTPByteReaderResult delete(String path)
    • getDeleteCommand

      protected void getDeleteCommand(String path)
    • deleteDirect

      public HTTPByteReaderResult deleteDirect(String path)
    • write

      public HTTPByteReaderResult write(String method, String path, String str)
    • write

      public HTTPByteReaderResult write(String method, String path, byte[] buffer, int offset, int len)
    • write

      public HTTPByteReaderResult write(String method, String path, PacketFragmentList fragmentList)
    • getPostMessage

      protected void getPostMessage(String method, String path, PacketFragmentList fragmentList)
    • writeDirect

      public HTTPByteReaderResult writeDirect(String method, String path, PacketFragmentList fragmentList)
    • getRequestPath

      protected String getRequestPath(String path, String host, int port)
    • getContextPath

      protected String getContextPath()
    • dumpDebug

      protected void dumpDebug()
    • sendRequest

      public HTTPByteWriter.SendResult sendRequest(byte[] request, boolean isHead)
    • sendRequest

      public HTTPByteWriter.SendResult sendRequest(byte[] request, PacketFragmentList fragmentList, int len, boolean isHead)
    • sendRequestBlocked

      public HTTPByteWriter.SendResult sendRequestBlocked(byte[] request, PacketFragmentList fragmentList, int len, boolean isHead)
    • sendRequestNonBlocked

      public HTTPByteWriter.SendResult sendRequestNonBlocked(byte[] request, PacketFragmentList fragmentList, int len, boolean isHead)
    • getMaxUsesBeforeReconnect

      public int getMaxUsesBeforeReconnect()
    • setMaxUsesBeforeReconnect

      public void setMaxUsesBeforeReconnect(int maxUsesBeforeReconnect)
    • getMaxRetries

      public int getMaxRetries()
    • setMaxRetries

      public void setMaxRetries(int maxRetries)
    • getReadWriteTimeout

      public int getReadWriteTimeout()
    • setReadWriteTimeout

      public void setReadWriteTimeout(int readWriteTimeout)
    • isRequestFullURL

      public boolean isRequestFullURL()
    • setRequestFullURL

      public void setRequestFullURL(boolean requestFullURL)
    • init

      protected boolean init()
    • innerConnect

      protected boolean innerConnect()
    • initHandShake

      protected void initHandShake() throws IOException
      Throws:
      IOException
    • socketWrite

      protected int socketWrite(ByteBuffer reqBuffer) throws IOException
      Throws:
      IOException
    • socketRead

      protected int socketRead(ByteBuffer readBuffer) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • parseLogOptions

      public static int parseLogOptions(String options)