Class Stream
java.lang.Object
tigase.socks5.Stream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactivate()Tries to activate stream and each of servicevoidAssign connection to streamvoidclose()Close streamgetConnection(Socks5ConnectionType connectionType) Returns connection with specified typeReturns stream data for keytigase.xmpp.jid.JIDGet bare JID of requesterReturns another connections of streamgetSID()Returns stream idtigase.xmpp.jid.JIDGet bare JID of targetintReturns bytes transferred by this streamintReturns hashCode for streamvoidproxy(ByteBuffer buf, Socks5IOService con) Forward data to another servicevoidSet stream datavoidsetRequester(tigase.xmpp.jid.JID requester) Set bare JID of requestervoidsetTarget(tigase.xmpp.jid.JID target) Set bare JID of targettoString()
-
Constructor Details
-
Stream
-
-
Method Details
-
getSID
-
getRequester
public tigase.xmpp.jid.JID getRequester()Get bare JID of requester -
setRequester
public void setRequester(tigase.xmpp.jid.JID requester) Set bare JID of requester- Parameters:
requester-
-
getTarget
public tigase.xmpp.jid.JID getTarget()Get bare JID of target -
setTarget
public void setTarget(tigase.xmpp.jid.JID target) Set bare JID of target -
setData
-
getData
-
addConnection
-
getConnection
Returns connection with specified type- Parameters:
connectionType-- Returns:
-
proxy
Forward data to another service- Parameters:
buf-con-- Throws:
IOException
-
activate
public boolean activate()Tries to activate stream and each of service- Returns:
-
close
public void close()Close stream -
hashCodeForStream
public int hashCodeForStream()Returns hashCode for stream- Returns:
-
getSecondConnection
Returns another connections of stream- Parameters:
con-- Returns:
-
getTransferredBytes
public int getTransferredBytes()Returns bytes transferred by this stream- Returns:
-
toString
-