Package com.biglybt.plugin.net.buddy
Class BuddyPluginBuddy.buddyConnection
- java.lang.Object
-
- com.biglybt.plugin.net.buddy.BuddyPluginBuddy.buddyConnection
-
- All Implemented Interfaces:
BuddyPluginBuddy.fragmentHandlerReceiver
- Enclosing class:
- BuddyPluginBuddy
protected class BuddyPluginBuddy.buddyConnection extends java.lang.Object implements BuddyPluginBuddy.fragmentHandlerReceiver
-
-
Field Summary
Fields Modifier and Type Field Description private BuddyPluginBuddy.buddyMessage
active_message
private boolean
closing
private boolean
connected
private int
connection_id
private BuddyPluginNetwork.DDBDetails
ddb_details
private java.lang.String
dir_str
private boolean
failed
private BuddyPluginBuddy.fragmentHandler
fragment_handler
private long
last_active
private boolean
outgoing
private boolean
remote_closing
-
Constructor Summary
Constructors Modifier Constructor Description protected
buddyConnection(BuddyPluginNetwork.DDBDetails _ddb_details, GenericMessageConnection _connection, boolean _outgoing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkTimeout(long now)
protected void
close()
void
connected()
protected void
disconnect()
void
failed(java.lang.Throwable error)
protected BuddyPluginNetwork.DDBDetails
getDDBDetails()
protected long
getLastActive(long now)
protected java.lang.String
getString()
protected java.lang.String
getString(boolean short_form)
protected boolean
hasFailed()
boolean
isActive()
protected boolean
isClosing()
protected boolean
isConnected()
protected boolean
isOutgoing()
protected boolean
isRemoteClosing()
void
receive(java.util.Map data_map)
protected void
remoteClosing()
protected void
send(BuddyPluginBuddy.buddyMessage msg)
protected void
sendCloseMessage(BuddyPluginBuddy.buddyMessage message)
protected void
sendMessage(BuddyPluginBuddy.buddyMessage message)
-
-
-
Field Detail
-
ddb_details
private final BuddyPluginNetwork.DDBDetails ddb_details
-
fragment_handler
private BuddyPluginBuddy.fragmentHandler fragment_handler
-
connection_id
private int connection_id
-
outgoing
private boolean outgoing
-
dir_str
private java.lang.String dir_str
-
active_message
private volatile BuddyPluginBuddy.buddyMessage active_message
-
connected
private volatile boolean connected
-
closing
private volatile boolean closing
-
remote_closing
private volatile boolean remote_closing
-
failed
private volatile boolean failed
-
last_active
private long last_active
-
-
Constructor Detail
-
buddyConnection
protected buddyConnection(BuddyPluginNetwork.DDBDetails _ddb_details, GenericMessageConnection _connection, boolean _outgoing)
-
-
Method Detail
-
getDDBDetails
protected BuddyPluginNetwork.DDBDetails getDDBDetails()
-
isConnected
protected boolean isConnected()
-
hasFailed
protected boolean hasFailed()
-
isOutgoing
protected boolean isOutgoing()
-
getLastActive
protected long getLastActive(long now)
-
sendMessage
protected void sendMessage(BuddyPluginBuddy.buddyMessage message) throws BuddyPluginException
- Throws:
BuddyPluginException
-
sendCloseMessage
protected void sendCloseMessage(BuddyPluginBuddy.buddyMessage message)
-
isActive
public boolean isActive()
-
connected
public void connected()
- Specified by:
connected
in interfaceBuddyPluginBuddy.fragmentHandlerReceiver
-
checkTimeout
protected boolean checkTimeout(long now)
-
send
protected void send(BuddyPluginBuddy.buddyMessage msg)
-
receive
public void receive(java.util.Map data_map)
- Specified by:
receive
in interfaceBuddyPluginBuddy.fragmentHandlerReceiver
-
close
protected void close()
-
isClosing
protected boolean isClosing()
-
remoteClosing
protected void remoteClosing()
-
isRemoteClosing
protected boolean isRemoteClosing()
-
disconnect
protected void disconnect()
-
failed
public void failed(java.lang.Throwable error)
- Specified by:
failed
in interfaceBuddyPluginBuddy.fragmentHandlerReceiver
-
getString
protected java.lang.String getString()
-
getString
protected java.lang.String getString(boolean short_form)
-
-