public abstract class AbstractConnection extends java.lang.Object implements Connection
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConnection(io.netty.channel.Channel channel,
java.net.InetSocketAddress remote) |
| Modifier and Type | Method and Description |
|---|---|
protected io.netty.channel.Channel |
channel() |
java.lang.String |
getLocalIpAddress()
Get the local ip-address to which this
Connection is listening to
as a String. |
int |
getLocalPort()
Get the local port to which this
Connection is listening to. |
byte[] |
getRawLocalIpAddress()
Get the local ip-address to which this
Connection is listening to
as a byte-array. |
byte[] |
getRawRemoteIpAddress()
Get the remote ip-address to which this
Connection is connected
to as a byte-array. |
java.net.InetSocketAddress |
getRemoteAddress()
Get the remote address to which this
Connection is connected to. |
java.lang.String |
getRemoteIpAddress()
Get the remote ip-address to which this
Connection is connected
to as a String. |
int |
getRemotePort()
Get the remote port to which this
Connection is connected to. |
boolean |
isSCTP()
Check whether or not this
Connection is using SCTP as its
underlying transport protocol. |
boolean |
isTCP()
Check whether or not this
Connection is using TCP as its
underlying transport protocol. |
boolean |
isTLS()
Check whether or not this
Connection is using TLS as its
underlying transport protocol. |
boolean |
isUDP()
Check whether or not this
Connection is using UDP as its
underlying transport protocol. |
boolean |
isWS()
Check whether or not this
Connection is using websocket as its
underlying transport protocol. |
protected io.netty.buffer.ByteBuf |
toByteBuf(io.pkts.packet.sip.SipMessage msg)
All
Connections needs to convert the msg to a ByteBuf
before writing it to the ChannelHandlerContext. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnect, sendprotected AbstractConnection(io.netty.channel.Channel channel,
java.net.InetSocketAddress remote)
protected io.netty.channel.Channel channel()
public byte[] getRawRemoteIpAddress()
ConnectionConnection is connected
to as a byte-array.getRawRemoteIpAddress in interface Connectionpublic byte[] getRawLocalIpAddress()
ConnectionConnection is listening to
as a byte-array.getRawLocalIpAddress in interface Connectionpublic final java.lang.String getLocalIpAddress()
ConnectionConnection is listening to
as a String.getLocalIpAddress in interface Connectionpublic final java.net.InetSocketAddress getRemoteAddress()
ConnectionConnection is connected to.getRemoteAddress in interface Connectionpublic final java.lang.String getRemoteIpAddress()
ConnectionConnection is connected
to as a String.getRemoteIpAddress in interface Connectionpublic int getLocalPort()
ConnectionConnection is listening to.getLocalPort in interface Connectionpublic int getRemotePort()
ConnectionConnection is connected to.getRemotePort in interface Connectionpublic boolean isUDP()
ConnectionConnection is using UDP as its
underlying transport protocol.isUDP in interface Connectionpublic boolean isTCP()
ConnectionConnection is using TCP as its
underlying transport protocol.isTCP in interface Connectionpublic boolean isTLS()
ConnectionConnection is using TLS as its
underlying transport protocol.isTLS in interface Connectionpublic boolean isSCTP()
ConnectionConnection is using SCTP as its
underlying transport protocol.isSCTP in interface Connectionpublic boolean isWS()
ConnectionConnection is using websocket as its
underlying transport protocol.isWS in interface Connectionprotected io.netty.buffer.ByteBuf toByteBuf(io.pkts.packet.sip.SipMessage msg)
Connections needs to convert the msg to a ByteBuf
before writing it to the ChannelHandlerContext.msg - the SipMessage to convert.ByteBufCopyright © 2015. All Rights Reserved.