Package com.wowza.io

Class HTTPByteWriter


  • public class HTTPByteWriter
    extends Object
    • Field Detail

      • CLASSNAME

        protected String CLASSNAME
      • HEADINDEX_CONTENTLENGTH

        public static final int HEADINDEX_CONTENTLENGTH
        See Also:
        Constant Field Values
      • 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.lang.time.FastDateFormat dateFormat
      • socket

        protected java.net.Socket socket
      • socketChannel

        protected java.nio.channels.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 java.util.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 Detail

      • HTTPByteWriter

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

      • 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)
      • getDeleteCommand

        protected void getDeleteCommand​(String path)
      • write

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

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

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

        protected String getContextPath()
      • dumpDebug

        protected void dumpDebug()
      • 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 java.io.IOException
        Throws:
        java.io.IOException
      • socketWrite

        protected int socketWrite​(java.nio.ByteBuffer reqBuffer)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • socketRead

        protected int socketRead​(java.nio.ByteBuffer readBuffer)
                          throws java.io.IOException,
                                 InterruptedException
        Throws:
        java.io.IOException
        InterruptedException
      • parseLogOptions

        public static int parseLogOptions​(String options)