|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.ssh.ContactSSHImpl
public class ContactSSHImpl
A Contact of SSH Type
| Field Summary |
|---|
| Fields inherited from interface net.java.sip.communicator.impl.protocol.ssh.ContactSSH |
|---|
CONVERSATION_MESSAGE_RECEIVED, SYSTEM_MESSAGE_RECEIVED |
| Constructor Summary | |
|---|---|
ContactSSHImpl(String id,
ProtocolProviderServiceSSHImpl parentProvider)
Creates an instance of a meta contact with the specified string used as a name and identifier. |
|
| Method Summary | |
|---|---|
void |
closeShellIO()
Closes the readers and writer associated with shell of this contact |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one which in terms of contacts translates to having equal ids. |
String |
getAddress()
Returns a String that can be used for identifying the contact. |
String |
getDisplayName()
Returns a String that could be used by any user interacting modules for referring to this contact. |
OperationSetFileTransfer |
getFileTransferOperationSet()
Returns the File Transfer operation set that this contact belongs to. |
String |
getHostName()
Returns the Hostname associated with this contact |
byte[] |
getImage()
Returns a byte array containing an image (most often a photo or an avatar) that the contact uses as a representation. |
com.jcraft.jsch.JSch |
getJSch()
Returns the JSch Stack identified associated with this contact |
int |
getMessageType()
Return the type of message received from remote server |
OperationSetBasicInstantMessaging |
getParentBasicInstantMessagingOperationSet()
Returns the BasicInstant Messaging operation set that this contact belongs to. |
ContactGroup |
getParentContactGroup()
Returns the group that contains this contact. |
OperationSetPersistentPresence |
getParentPresenceOperationSet()
Returns the persistent presence operation set that this contact belongs to. |
String |
getPassword()
Returns the password associated with SSH Channel of this contact |
String |
getPersistentData()
Returns persistent data of the contact. |
PresenceStatus |
getPresenceStatus()
Returns the status of the contact. |
ProtocolProviderService |
getProtocolProvider()
Returns a reference to the protocol provider that created the contact. |
com.jcraft.jsch.Channel |
getShellChannel()
Returns the SSH Shell Channel associated with this contact |
InputStream |
getShellInputStream()
Returns the Input Stream associated with SSH Channel of this contact |
OutputStream |
getShellOutputStream()
Returns the Output Stream associated with SSH Channel of this contact |
InputStreamReader |
getShellReader()
Returns the BufferedReader associated with SSH Channel of this contact |
PrintWriter |
getShellWriter()
Returns the PrintWriter associated with SSH Channel of this contact |
SSHContactInfo |
getSSHConfigurationForm()
Returns the SSHContactInfo associated with this contact |
com.jcraft.jsch.Session |
getSSHSession()
Returns the SSH Session associated with this contact |
String |
getStatusMessage()
Return the current status message of this contact. |
String |
getUserName()
Returns the userName associated with SSH Channel of this contact |
void |
initializeShellIO(InputStream shellInputStream,
OutputStream shellOutputStream)
Initializes the reader and writers associated with shell of this contact |
boolean |
isCommandSent()
Returns true if a command has been sent whos reply was not received yet false otherwise |
boolean |
isConnectionInProgress()
Determines whether a connection to a remote server is already underway |
boolean |
isLocal()
Determines whether or not this contact represents our own identity. |
boolean |
isPersistent()
Determines whether or not this contact is being stored by the server. |
boolean |
isResolved()
Determines whether or not this contact has been resolved against the server. |
void |
savePersistentDetails()
Saves the details of contact in persistentData seperated by separator Passowrd is saved unsecurely using Base64 encoding |
void |
sendLine(String message)
Sends a message a line to remote machine via the Shell Writer |
void |
setCommandSent(boolean commandSent)
Set the state of commandSent variable which determines whether a reply to a command sent is awaited |
void |
setConnectionInProgress(boolean isConnectionInProgress)
Sets the status of connection attempt to remote server This method is synchronized |
void |
setJSch(com.jcraft.jsch.JSch jsch)
Sets the JSch Stack identified associated with this contact |
void |
setMessageType(int messageType)
Sets the type of message received from remote server |
void |
setParentGroup(ContactGroupSSHImpl newParentGroup)
This method is only called when the contact is added to a new ContactGroupSSHImpl by the ContactGroupSSHImpl itself. |
void |
setPassword(String password)
Sets the Password associated with this contact |
void |
setPersistent(boolean isPersistent)
Specifies whether or not this contact is being stored by the server. |
void |
setPersistentData(String persistentData)
Stores persistent data in fields of the contact seperated by separator. |
void |
setPresenceStatus(PresenceStatus sshPresenceStatus)
Sets sshPresenceStatus as the PresenceStatus that this contact is currently in. |
void |
setResolved(boolean resolved)
Makes the contact resolved or unresolved. |
void |
setShellChannel(com.jcraft.jsch.Channel sshShellChannel)
Sets the SSH Shell channel associated with this contact |
void |
setSSHSession(com.jcraft.jsch.Session sshSession)
Sets the SSH Session associated with this contact |
void |
startTimerTask()
Starts the timer and its task to periodically update the status of remote machine |
void |
stopTimerTask()
Stops the timer and its task to stop updating the status of remote machine |
String |
toString()
Returns a string representation of this contact, containing most of its representative details. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContactSSHImpl(String id,
ProtocolProviderServiceSSHImpl parentProvider)
id - the identifier of this contact (also used as a name).parentProvider - the provider that created us.| Method Detail |
|---|
public void initializeShellIO(InputStream shellInputStream,
OutputStream shellOutputStream)
initializeShellIO in interface ContactSSHshellInputStream - The InputStream of stackshellOutputStream - The OutputStream of stackpublic void closeShellIO()
closeShellIO in interface ContactSSH
public void sendLine(String message)
throws IOException
sendLine in interface ContactSSHmessage - to be sent
IOException - if message failed to be sentpublic void startTimerTask()
startTimerTask in interface ContactSSHpublic void stopTimerTask()
stopTimerTask in interface ContactSSHpublic void savePersistentDetails()
savePersistentDetails in interface ContactSSHpublic void setPersistentData(String persistentData)
setPersistentData in interface ContactSSHpersistentData - of the contactpublic boolean isConnectionInProgress()
isConnectionInProgress in interface ContactSSHpublic void setConnectionInProgress(boolean isConnectionInProgress)
setConnectionInProgress in interface ContactSSHisConnectionInProgress - public SSHContactInfo getSSHConfigurationForm()
getSSHConfigurationForm in interface ContactSSHpublic com.jcraft.jsch.JSch getJSch()
getJSch in interface ContactSSHpublic void setJSch(com.jcraft.jsch.JSch jsch)
setJSch in interface ContactSSHjsch - to be associatedpublic void setParentGroup(ContactGroupSSHImpl newParentGroup)
setParentGroup in interface ContactSSHnewParentGroup - the ContactGroupSSHImpl that is now
parent of this ContactSSHImplpublic String getHostName()
getHostName in interface ContactSSHpublic String getAddress()
getAddress in interface Contactpublic String getDisplayName()
getDisplayName in interface Contactpublic byte[] getImage()
getImage in interface Contactpublic boolean isCommandSent()
isCommandSent in interface ContactSSHpublic void setCommandSent(boolean commandSent)
setCommandSent in interface ContactSSHpublic int getMessageType()
getMessageType in interface ContactSSHpublic void setMessageType(int messageType)
setMessageType in interface ContactSSHmessageType - public PresenceStatus getPresenceStatus()
getPresenceStatus in interface Contactpublic void setPresenceStatus(PresenceStatus sshPresenceStatus)
setPresenceStatus in interface ContactSSHsshPresenceStatus - the SSHPresenceStatus
currently valid for this contact.public ProtocolProviderService getProtocolProvider()
getProtocolProvider in interface Contactpublic boolean isLocal()
public ContactGroup getParentContactGroup()
getParentContactGroup in interface Contactpublic String toString()
toString in class Objectpublic boolean isPersistent()
isPersistent in interface Contactpublic void setPersistent(boolean isPersistent)
setPersistent in interface ContactSSHisPersistent - true if the contact is persistent and false
otherwise.public String getPersistentData()
getPersistentData in interface Contactpublic boolean isResolved()
isResolved in interface Contactpublic void setResolved(boolean resolved)
setResolved in interface ContactSSHresolved - true to make the contact resolved; false to
make it unresolvedpublic boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare.
true if this contact has the same id as that of the
obj argument.public OperationSetPersistentPresence getParentPresenceOperationSet()
getParentPresenceOperationSet in interface ContactSSHpublic OperationSetBasicInstantMessaging getParentBasicInstantMessagingOperationSet()
getParentBasicInstantMessagingOperationSet in interface ContactSSHpublic OperationSetFileTransfer getFileTransferOperationSet()
getFileTransferOperationSet in interface ContactSSHpublic com.jcraft.jsch.Session getSSHSession()
getSSHSession in interface ContactSSHpublic void setSSHSession(com.jcraft.jsch.Session sshSession)
setSSHSession in interface ContactSSHsshSession - the newly created SSH Session to be associatedpublic com.jcraft.jsch.Channel getShellChannel()
getShellChannel in interface ContactSSHpublic void setShellChannel(com.jcraft.jsch.Channel sshShellChannel)
setShellChannel in interface ContactSSHsshShellChannel - to be associated with SSH Session of this contactpublic InputStream getShellInputStream()
getShellInputStream in interface ContactSSHpublic OutputStream getShellOutputStream()
getShellOutputStream in interface ContactSSHpublic InputStreamReader getShellReader()
getShellReader in interface ContactSSHpublic PrintWriter getShellWriter()
getShellWriter in interface ContactSSHpublic String getUserName()
getUserName in interface ContactSSHpublic String getPassword()
getPassword in interface ContactSSHpublic void setPassword(String password)
setPassword in interface ContactSSHpassword - public String getStatusMessage()
getStatusMessage in interface Contact
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||