|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aelitis.azureus.core.networkmanager.impl.TransportImpl
public abstract class TransportImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.aelitis.azureus.core.networkmanager.Transport |
---|
Transport.ConnectListener |
Field Summary |
---|
Fields inherited from interface com.aelitis.azureus.core.networkmanager.Transport |
---|
TRANSPORT_MODE_FAST, TRANSPORT_MODE_NORMAL, TRANSPORT_MODE_TURBO |
Constructor Summary | |
---|---|
protected |
TransportImpl()
|
Method Summary | |
---|---|
void |
bindConnection(NetworkConnection connection)
|
void |
connectedInbound()
Indicate that inbound connection is complete |
void |
connectedOutbound()
|
java.lang.String |
getEncryption(boolean verbose)
Return a textual description of the encryption for this transport |
TransportHelperFilter |
getFilter()
|
java.lang.String |
getProtocol()
|
TransportStartpoint |
getTransportStartpoint()
|
boolean |
isEncrypted()
|
long |
isReadyForRead(EventWaiter waiter)
Is the transport ready to read, i.e. |
boolean |
isReadyForWrite(EventWaiter waiter)
Is the transport ready to write, i.e. |
boolean |
isSOCKS()
|
long |
read(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
Read data from the transport into the given buffers. |
protected void |
readFailed(java.lang.Throwable msg)
|
protected boolean |
readyForRead(boolean ready)
|
protected boolean |
readyForWrite(boolean ready)
|
void |
setAlreadyRead(java.nio.ByteBuffer bytes_already_read)
Inject the given already-read data back into the read stream. |
void |
setFilter(TransportHelperFilter _filter)
|
void |
setReadyForRead()
fake a wakeup so that a read cycle is attempted |
void |
setTrace(boolean on)
|
void |
unbindConnection(NetworkConnection connection)
|
long |
write(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
Write data to the transport from the given buffers. |
protected void |
writeFailed(java.lang.Throwable msg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.aelitis.azureus.core.networkmanager.Transport |
---|
close, connectOutbound, getMssSize, getTransportEndpoint, getTransportMode, setTransportMode |
Methods inherited from interface com.aelitis.azureus.core.networkmanager.TransportBase |
---|
getDescription, isTCP |
Constructor Detail |
---|
protected TransportImpl()
Method Detail |
---|
public TransportStartpoint getTransportStartpoint()
getTransportStartpoint
in interface Transport
public void setFilter(TransportHelperFilter _filter)
public TransportHelperFilter getFilter()
public void setAlreadyRead(java.nio.ByteBuffer bytes_already_read)
Transport
setAlreadyRead
in interface Transport
bytes_already_read
- datapublic java.lang.String getEncryption(boolean verbose)
Transport
getEncryption
in interface Transport
public java.lang.String getProtocol()
getProtocol
in interface Transport
public boolean isEncrypted()
isEncrypted
in interface Transport
public boolean isSOCKS()
isSOCKS
in interface Transport
public boolean isReadyForWrite(EventWaiter waiter)
isReadyForWrite
in interface TransportBase
protected boolean readyForWrite(boolean ready)
protected void writeFailed(java.lang.Throwable msg)
public long isReadyForRead(EventWaiter waiter)
isReadyForRead
in interface TransportBase
protected boolean readyForRead(boolean ready)
public void setReadyForRead()
Transport
setReadyForRead
in interface Transport
protected void readFailed(java.lang.Throwable msg)
public long write(java.nio.ByteBuffer[] buffers, int array_offset, int length) throws java.io.IOException
write
in interface Transport
buffers
- from which bytes are to be retrievedarray_offset
- offset within the buffer array of the first buffer from which bytes are to be retrievedlength
- maximum number of buffers to be accessed
java.io.IOException
- on write errorpublic long read(java.nio.ByteBuffer[] buffers, int array_offset, int length) throws java.io.IOException
read
in interface Transport
buffers
- into which bytes are to be placedarray_offset
- offset within the buffer array of the first buffer into which bytes are to be placedlength
- maximum number of buffers to be accessed
java.io.IOException
- on read errorpublic void connectedInbound()
Transport
connectedInbound
in interface Transport
public void connectedOutbound()
public void bindConnection(NetworkConnection connection)
bindConnection
in interface Transport
public void unbindConnection(NetworkConnection connection)
unbindConnection
in interface Transport
public void setTrace(boolean on)
setTrace
in interface Transport
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |