|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.networkmanager.impl.NetworkConnectionImpl.bogusTransport
protected static class NetworkConnectionImpl.bogusTransport
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 |
NetworkConnectionImpl.bogusTransport(Transport _transport)
|
Method Summary | |
---|---|
void |
bindConnection(NetworkConnection connection)
|
void |
close(java.lang.String reason)
Close the transport connection. |
void |
connectedInbound()
Indicate that inbound connection is complete |
void |
connectOutbound(java.nio.ByteBuffer initial_data,
Transport.ConnectListener listener,
int priority)
Kick off an outbound connection |
java.lang.String |
getDescription()
Get a textual description for this transport. |
java.lang.String |
getEncryption(boolean verbose)
Return a textual description of the encryption for this transport |
int |
getMssSize()
|
java.lang.String |
getProtocol()
|
TransportEndpoint |
getTransportEndpoint()
Get the socket channel used by the transport. |
int |
getTransportMode()
Get the transport's speed mode. |
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()
|
boolean |
isTCP()
|
long |
read(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
Read data from the transport into the given buffers. |
void |
setAlreadyRead(java.nio.ByteBuffer bytes_already_read)
Inject the given already-read data back into the read stream. |
void |
setReadyForRead()
fake a wakeup so that a read cycle is attempted |
void |
setTrace(boolean on)
|
void |
setTransportMode(int mode)
Set the transport to the given speed mode. |
void |
unbindConnection(NetworkConnection connection)
|
long |
write(java.nio.ByteBuffer[] buffers,
int array_offset,
int length)
Write data to the transport from the given buffers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected NetworkConnectionImpl.bogusTransport(Transport _transport)
Method Detail |
---|
public boolean isReadyForWrite(EventWaiter waiter)
TransportBase
isReadyForWrite
in interface TransportBase
public long isReadyForRead(EventWaiter waiter)
TransportBase
isReadyForRead
in interface TransportBase
public boolean isTCP()
isTCP
in interface TransportBase
public boolean isSOCKS()
isSOCKS
in interface Transport
public java.lang.String getDescription()
TransportBase
getDescription
in interface TransportBase
public int getMssSize()
getMssSize
in interface Transport
public void setAlreadyRead(java.nio.ByteBuffer bytes_already_read)
Transport
setAlreadyRead
in interface Transport
bytes_already_read
- datapublic TransportEndpoint getTransportEndpoint()
Transport
getTransportEndpoint
in interface Transport
public TransportStartpoint getTransportStartpoint()
getTransportStartpoint
in interface Transport
public boolean isEncrypted()
isEncrypted
in interface Transport
public java.lang.String getEncryption(boolean verbose)
Transport
getEncryption
in interface Transport
public java.lang.String getProtocol()
getProtocol
in interface Transport
public void setReadyForRead()
Transport
setReadyForRead
in interface Transport
public long write(java.nio.ByteBuffer[] buffers, int array_offset, int length) throws java.io.IOException
Transport
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
Transport
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 setTransportMode(int mode)
Transport
setTransportMode
in interface Transport
mode
- to change topublic int getTransportMode()
Transport
getTransportMode
in interface Transport
public void connectOutbound(java.nio.ByteBuffer initial_data, Transport.ConnectListener listener, int priority)
Transport
connectOutbound
in interface Transport
public void connectedInbound()
Transport
connectedInbound
in interface Transport
public void close(java.lang.String reason)
Transport
close
in interface Transport
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 |