Package com.wowza.io
Class HTTPByteWriter
Object
com.wowza.io.HTTPByteWriter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
static final int
protected Class<? extends HTTPByteWriter>
protected String
protected int
static final int
static final String
protected org.apache.commons.lang3.time.FastDateFormat
protected String
static final int
static final int
static final int
static final int
protected String
protected boolean
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected int
static final int
protected int
static final int
protected int
protected StringBuffer
protected Boolean
protected String[]
protected int
protected String
protected int
protected int
static final int
protected int
static final int
protected String
protected boolean
protected long
static final long
protected int
static final int
protected Socket
protected SocketChannel
protected String
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLogOptions
(int options) void
close()
void
connect()
deleteDirect
(String path) protected void
int
protected String
protected void
getDeleteCommand
(String path) boolean
getIsSSL()
int
int
int
protected void
getPostMessage
(String method, String path, PacketFragmentList fragmentList) int
int
protected String
getRequestPath
(String path, String host, int port) long
int
protected boolean
init()
protected void
protected boolean
boolean
isLogOption
(int option) boolean
isOpen()
boolean
protected void
parseHeader
(HTTPByteWriter.SendResult result, byte[] buffer, int offset, int len, boolean isHead) static int
parseLogOptions
(String options) protected void
void
removeLogOptions
(int options) sendRequest
(byte[] request, boolean isHead) sendRequest
(byte[] request, PacketFragmentList fragmentList, int len, boolean isHead) sendRequestBlocked
(byte[] request, PacketFragmentList fragmentList, int len, boolean isHead) sendRequestNonBlocked
(byte[] request, PacketFragmentList fragmentList, int len, boolean isHead) void
setConnectionTimeout
(int connectionTimeout) void
setIsSSL
(boolean ssl) void
setLogOptions
(int options) void
setMaxRetries
(int maxRetries) void
setMaxUsesBeforeReconnect
(int maxUsesBeforeReconnect) void
setProxyAddress
(String host, int port) void
setReadWriteTimeout
(int readWriteTimeout) void
setReceiveBufferSize
(int receiveBufferSize) void
setRequestFullURL
(boolean requestFullURL) void
setRetryTimeout
(long timeout) void
setSendBufferSize
(int sendBufferSize) void
setUserAgent
(String userAgent) protected int
socketRead
(ByteBuffer readBuffer) protected int
socketWrite
(ByteBuffer reqBuffer) write
(String method, String path, PacketFragmentList fragmentList) writeDirect
(String method, String path, PacketFragmentList fragmentList)
-
Field Details
-
CLASSNAME
-
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
- 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
-
port
protected int port -
reqPath
-
proxyHost
-
proxyPort
protected int proxyPort -
dateFormat
protected org.apache.commons.lang3.time.FastDateFormat dateFormat -
socket
-
socketChannel
-
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
-
debugPrefix
-
requestFullURL
protected boolean requestFullURL -
parseDateFormats
-
sendBufferSize
protected int sendBufferSize -
receiveBufferSize
protected int receiveBufferSize -
userAgent
-
nonblocked
-
logOptions
protected int logOptions -
addrIdx
protected int addrIdx -
isSSL
protected boolean isSSL
-
-
Constructor Details
-
HTTPByteWriter
-
-
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
-
setUserAgent
-
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
-
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
-
getDeleteCommand
-
deleteDirect
-
write
-
write
-
write
-
getPostMessage
-
writeDirect
public HTTPByteReaderResult writeDirect(String method, String path, PacketFragmentList fragmentList) -
getRequestPath
-
getContextPath
-
dumpDebug
protected void dumpDebug() -
sendRequest
-
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
- Throws:
IOException
-
socketWrite
- Throws:
IOException
-
socketRead
- Throws:
IOException
InterruptedException
-
parseLogOptions
-