public final class Stream extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addStreamListener(StreamListener listener)
Add a listener to this AP2AP Stream.
|
void |
disconnect()
Disconenct this Stream and close the AP2AP connection.
|
boolean |
equals(Object compared)
Overridden to compare Stream objects based on ID.
|
Application |
getApplication()
Return the application this stream belongs to.
|
Object |
getData(String name)
Returns the user data to which this object maps to the specified by the name.
|
Friend |
getFriend()
Return the User which is on the other end of this Stream.
|
String |
getId()
Return ID of this Stream.
|
int |
hashCode()
Overridden to use ID as hashcode.
|
void |
removeStreamListener(StreamListener listener)
Remove a listener from the collection of listeners to this Stream.
|
void |
send(String datagram)
Send a datagram message through this stream.
|
void |
setData(String name,
Object userData)
Associates the specified user data with the specified name in this object.
|
String |
toString()
Return ID as String representation.
|
void |
write(String text)
Send a message through this Stream.
|
public int hashCode()
public boolean equals(Object compared)
public String toString()
public Application getApplication()
public String getId()
public Friend getFriend()
public void write(String text) throws SkypeException
text - The message to send.SkypeException - when the connection to the Skype client has gone bad or AP2AP connection is not ok.public void send(String datagram) throws SkypeException
datagram - the data message to send.SkypeException - when the Skype client connection has gone bad or when AP2AP connection is not ok.public void addStreamListener(StreamListener listener)
listener - listener to add to the collection of listeners.public void removeStreamListener(StreamListener listener)
listener - the listener to remove.public void disconnect()
throws SkypeException
SkypeException - when the Skype client connection has gone bad.public final Object getData(String name)
name - name whose associated user data is to be returned.Map.get(Object)public final void setData(String name, Object userData)
name - name with which the specified user data is to be associated.userData - user data to be associated with the specified name.Map.put(Object, Object)Copyright © 2013. All Rights Reserved.