Class GenericMessageConnectionDirect
java.lang.Object
com.biglybt.pifimpl.local.messaging.GenericMessageConnectionDirect
- All Implemented Interfaces:
GenericMessageConnectionAdapter
public class GenericMessageConnectionDirect
extends Object
implements GenericMessageConnectionAdapter
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.biglybt.pifimpl.local.messaging.GenericMessageConnectionAdapter
GenericMessageConnectionAdapter.ConnectionListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private NetworkConnection
private static AsyncDispatcher
private GenericMessageEndpointImpl
private List
<LimitedRateGroup> static final int
private String
private String
private List
<LimitedRateGroup> private GenericMessageConnectionImpl
private ConnectionImpl
private boolean
private byte[][]
private int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
GenericMessageConnectionDirect
(String _msg_id, String _msg_desc, GenericMessageEndpointImpl _endpoint, int _stream_crypto, byte[][] _shared_secrets) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accepted()
void
addInboundRateLimiter
(RateLimiter _limiter) void
addOutboundRateLimiter
(RateLimiter _limiter) void
close()
protected void
connect
(NetworkConnection _connection) Incoming connect callvoid
connect
(ByteBuffer upper_initial_data, GenericMessageConnectionAdapter.ConnectionListener listener) int
int
getType()
protected static GenericMessageConnectionDirect
receive
(GenericMessageEndpointImpl endpoint, String msg_id, String msg_desc, int stream_crypto, byte[][] shared_secrets) void
removeInboundRateLimiter
(RateLimiter _limiter) void
removeOutboundRateLimiter
(RateLimiter _limiter) void
send
(PooledByteBuffer data) void
setOwner
(GenericMessageConnectionImpl _owner) protected void
-
Field Details
-
MAX_MESSAGE_SIZE
public static final int MAX_MESSAGE_SIZE- See Also:
-
dispatcher
-
owner
-
msg_id
-
msg_desc
-
stream_crypto
private int stream_crypto -
endpoint
-
connection
-
plugin_connection
-
connected
private volatile boolean connected -
processing
private boolean processing -
closed
private volatile boolean closed -
inbound_rls
-
outbound_rls
-
-
Constructor Details
-
GenericMessageConnectionDirect
protected GenericMessageConnectionDirect(String _msg_id, String _msg_desc, GenericMessageEndpointImpl _endpoint, int _stream_crypto, byte[][] _shared_secrets)
-
-
Method Details
-
receive
protected static GenericMessageConnectionDirect receive(GenericMessageEndpointImpl endpoint, String msg_id, String msg_desc, int stream_crypto, byte[][] shared_secrets) -
setOwner
- Specified by:
setOwner
in interfaceGenericMessageConnectionAdapter
-
getMaximumMessageSize
public int getMaximumMessageSize()- Specified by:
getMaximumMessageSize
in interfaceGenericMessageConnectionAdapter
-
getType
- Specified by:
getType
in interfaceGenericMessageConnectionAdapter
-
getTransportType
public int getTransportType()- Specified by:
getTransportType
in interfaceGenericMessageConnectionAdapter
-
addInboundRateLimiter
- Specified by:
addInboundRateLimiter
in interfaceGenericMessageConnectionAdapter
-
removeInboundRateLimiter
- Specified by:
removeInboundRateLimiter
in interfaceGenericMessageConnectionAdapter
-
addOutboundRateLimiter
- Specified by:
addOutboundRateLimiter
in interfaceGenericMessageConnectionAdapter
-
removeOutboundRateLimiter
- Specified by:
removeOutboundRateLimiter
in interfaceGenericMessageConnectionAdapter
-
connect
Incoming connect call- Parameters:
_connection
-
-
accepted
public void accepted()- Specified by:
accepted
in interfaceGenericMessageConnectionAdapter
-
getEndpoint
- Specified by:
getEndpoint
in interfaceGenericMessageConnectionAdapter
-
getStartpoint
- Specified by:
getStartpoint
in interfaceGenericMessageConnectionAdapter
-
getConnection
- Specified by:
getConnection
in interfaceGenericMessageConnectionAdapter
-
connect
public void connect(ByteBuffer upper_initial_data, GenericMessageConnectionAdapter.ConnectionListener listener) - Specified by:
connect
in interfaceGenericMessageConnectionAdapter
-
startProcessing
protected void startProcessing() -
send
- Specified by:
send
in interfaceGenericMessageConnectionAdapter
- Throws:
MessageException
-
close
- Specified by:
close
in interfaceGenericMessageConnectionAdapter
- Throws:
MessageException
-