public class SipClientInboundWay extends ClientInboundWay
Constructor and Description |
---|
SipClientInboundWay(Connection<Client> connection,
int bufferSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
copyResponseTransportHeaders(Series<Header> headers,
Response response)
Copies headers into a response.
|
protected Response |
createResponse(Status status)
Creates a response object for the given status.
|
protected Status |
createStatus(int code)
Returns the status corresponding to a given status code.
|
SipClientHelper |
getHelper()
Returns the parent connector helper.
|
protected boolean |
hasIoInterest()
Indicates if we want to be selected for IO processing when the socket
related socket is prepared.
|
boolean |
isEmpty()
Indicates if the way is empty.
|
protected void |
onReceived(Response message)
Call back invoked when the message is received.
|
void |
updateState()
Updates the way IO and message states.
|
getActualMessage, getConnection, getInterestOperations, onHeadersCompleted, onMessageCompleted, readStartLine
clear, createEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onError, onFill, onFillEof, onPostProcessing, onTimeOut, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLoadScore, getLogger, getMessage, getMessageState, getRegistration, isAvailable, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toString
public SipClientInboundWay(Connection<Client> connection, int bufferSize)
connection
- The parent connection.bufferSize
- The byte buffer size.IOException
protected void copyResponseTransportHeaders(Series<Header> headers, Response response)
ClientInboundWay
copyResponseTransportHeaders
in class ClientInboundWay
headers
- The headers to copy.response
- The response to update.protected Response createResponse(Status status)
ClientInboundWay
createResponse
in class ClientInboundWay
status
- The response status.protected Status createStatus(int code)
ClientInboundWay
createStatus
in class ClientInboundWay
code
- The status code.public SipClientHelper getHelper()
Way
getHelper
in class ClientInboundWay
public boolean isEmpty()
Way
protected void onReceived(Response message) throws IOException
InboundWay
onReceived
in class ClientInboundWay
message
- The new message received.IOException
protected boolean hasIoInterest()
Way
hasIoInterest
in class Way
public void updateState()
Way
updateState
in class InboundWay
Copyright © 2005–2013. All rights reserved.