|
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.service.protocol.AbstractProtocolProviderService
net.java.sip.communicator.impl.protocol.ssh.ProtocolProviderServiceSSHImpl
public class ProtocolProviderServiceSSHImpl
A SSH implementation of the ProtocolProviderService.
| Field Summary | |
|---|---|
static String |
SSH_PROTOCOL_NAME
The name of this protocol. |
| Fields inherited from interface net.java.sip.communicator.service.protocol.ProtocolProviderService |
|---|
BIND_RETRIES_DEFAULT_VALUE, BIND_RETRIES_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
ProtocolProviderServiceSSHImpl()
The default constructor for the SSH protocol provider. |
|
| Method Summary | |
|---|---|
void |
closeShellChannel(ContactSSH sshContact)
Closes the Shell channel are associated IO Streams |
(package private) void |
closeSSHSession(ContactSSH sshContact)
Closes the SSH Session associated with the contact |
void |
connectShell(ContactSSH sshContact,
Message firstMessage)
Creates a shell channel to the remote machine a new jsch session is also created if the current one is invalid |
void |
createShellChannel(ContactSSH sshContact)
Creates a channel for shell type in the current session channel types = shell, sftp, exec(X forwarding), direct-tcpip(stream forwarding) etc |
void |
createSSHSessionAndLogin(ContactSSH sshContact)
Creates a SSH Session with a remote machine and tries to login according to the details specified by Contact An appropriate message is shown to the end user in case the login fails |
AccountID |
getAccountID()
Returns the AccountID that uniquely identifies the account represented by this instance of the ProtocolProviderService. |
ProtocolIcon |
getProtocolIcon()
Returns the ssh protocol icon. |
String |
getProtocolName()
Returns the short name of the protocol that the implementation of this provider is based upon (like SIP, Jabber, ICQ/AIM, or others for example). |
RegistrationState |
getRegistrationState()
Returns the state of the registration of this protocol provider with the corresponding registration service. |
TransportProtocol |
getTransportProtocol()
Returns the "transport" protocol of this instance used to carry the control channel for the current protocol service. |
static UIService |
getUIService()
Returns a reference to UIServce for accessing UI related services |
protected void |
initialize(String userID,
AccountID accountID)
Initializes the service implementation, and puts it in a sate where it could interoperate with other services. |
boolean |
isSessionValid(ContactSSH sshContact)
Determines whether a vaild session exists for the contact of remote machine. |
boolean |
isShellConnected(ContactSSH sshContact)
Determines whether the contact is connected to shell of remote machine as a precheck for any further operation |
boolean |
isSignalingTransportSecure()
Indicate if the signaling transport of this protocol instance uses a secure (e.g. |
void |
register(SecurityAuthority authority)
Starts the registration process. |
void |
showWelcomeMessage(ContactSSH sshContact)
Presents the login welcome message to user |
void |
shutdown()
Makes the service implementation close all open sockets and release any resources that it might have taken and prepare for shutdown/garbage collection. |
void |
unregister()
Ends the registration of this protocol provider with the current registration service. |
| Methods inherited from class net.java.sip.communicator.service.protocol.AbstractProtocolProviderService |
|---|
addRegistrationStateChangeListener, addSupportedOperationSet, clearRegistrationStateChangeListener, fireRegistrationStateChanged, getOperationSet, getProtocolDisplayName, getSupportedOperationSets, isRegistered, removeRegistrationStateChangeListener, removeSupportedOperationSet, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.protocol.ProtocolProviderService |
|---|
hashCode |
| Field Detail |
|---|
public static final String SSH_PROTOCOL_NAME
| Constructor Detail |
|---|
public ProtocolProviderServiceSSHImpl()
| Method Detail |
|---|
protected void initialize(String userID,
AccountID accountID)
userID - the user id of the ssh account we're currently
initializingaccountID - the identifier of the account that this protocol
provider represents.AccountIDpublic boolean isSessionValid(ContactSSH sshContact)
sshContact - ID of SSH Contact
public boolean isShellConnected(ContactSSH sshContact)
sshContact - ID of SSH Contact
public void connectShell(ContactSSH sshContact,
Message firstMessage)
sshContact - the contact of the remote machinefirstMessage - the first message
public void createShellChannel(ContactSSH sshContact)
throws IOException
sshContact - ID of SSH Contact
IOException - if the shell channel cannot be created
public void closeShellChannel(ContactSSH sshContact)
throws com.jcraft.jsch.JSchException,
IOException
sshContact - ID of SSH Contact
com.jcraft.jsch.JSchException - if something went wrong in JSch
IOException - if I/O exception occurred
public void createSSHSessionAndLogin(ContactSSH sshContact)
throws com.jcraft.jsch.JSchException,
OperationFailedException,
InterruptedException
sshContact - ID of SSH Contact
com.jcraft.jsch.JSchException - if a JSch is unable to create a SSH Session with
the remote machine
InterruptedException - if the thread is interrupted before session
connected or is timed out
OperationFailedException - if not of above reasons :-)void closeSSHSession(ContactSSH sshContact)
sshContact - ID of SSH Contact
public void showWelcomeMessage(ContactSSH sshContact)
throws IOException
sshContact - ID of SSH Contact
IOException - if I/O exception occurredpublic static UIService getUIService()
public AccountID getAccountID()
public String getProtocolName()
public RegistrationState getRegistrationState()
public void register(SecurityAuthority authority)
throws OperationFailedException
authority - the security authority that will be used for
resolving any security challenges that may be returned during the
registration or at any moment while wer're registered.
OperationFailedException - with the corresponding code it the
registration fails for some reason (e.g. a networking error or an
implementation problem).public void shutdown()
public void unregister()
throws OperationFailedException
OperationFailedException - with the corresponding code it the
registration fails for some reason (e.g. a networking error or an
implementation problem).public boolean isSignalingTransportSecure()
ProtocolProviderService
public TransportProtocol getTransportProtocol()
public ProtocolIcon getProtocolIcon()
|
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 | |||||||||