Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sshtools.j2ssh.connection
Class ConnectionProtocol

    java.lang.Object
      com.sshtools.j2ssh.transport.Service
          com.sshtools.j2ssh.transport.AsyncService
              com.sshtools.j2ssh.connection.ConnectionProtocol

All Implemented Interfaces:
  java.lang.Runnable

public class ConnectionProtocol
extends AsyncService

DOCUMENT ME!

Field Summary

Fields inherited from class com.sshtools.j2ssh.transport.AsyncService
`thread`

Fields inherited from class com.sshtools.j2ssh.transport.Service
`ACCEPTING_SERVICE, messageStore, REQUESTING_SERVICE, startMode, state, transport`

Constructor Summary
`ConnectionProtocol()` Creates a new ConnectionProtocol object.

Method Summary
`void` | `addChannelFactory(java.lang.String channelName, ChannelFactory cf)` DOCUMENT ME!
`void` | `allowGlobalRequest(java.lang.String requestName, GlobalRequestHandler handler)` DOCUMENT ME!
`protected void` | `closeChannel(Channel channel)` DOCUMENT ME!
`boolean` | `containsChannelFactory(java.lang.String channelName)` DOCUMENT ME!
`protected void` | `freeChannel(Channel channel)` DOCUMENT ME!
`protected int[]` | `getAsyncMessageFilter()` DOCUMENT ME!
`boolean` | `isConnected()` DOCUMENT ME!
`protected void` | `onGlobalRequest(java.lang.String requestName, boolean wantReply, byte[] requestData)` DOCUMENT ME!
`protected void` | `onMessageReceived(SshMessage msg)` DOCUMENT ME!
`protected void` | `onServiceAccept()` DOCUMENT ME!
`protected void` | `onServiceInit(int startMode)` DOCUMENT ME!
`protected void` | `onServiceRequest()` DOCUMENT ME!
`protected void` | `onStop()` DOCUMENT ME!
`boolean` | `openChannel(Channel channel)` DOCUMENT ME!
`boolean` | `openChannel(Channel channel, ChannelEventListener eventListener)` DOCUMENT ME!
`void` | `removeChannelFactory(java.lang.String channelName)` DOCUMENT ME!
`void` | `sendChannelData(Channel channel, byte[] data)` DOCUMENT ME!
`void` | `sendChannelEOF(Channel channel)` DOCUMENT ME!
`void` | `sendChannelExtData(Channel channel, int extendedType, byte[] data)` DOCUMENT ME!
`protected void` | `sendChannelFailure(Channel channel)` DOCUMENT ME!
`protected void` | `sendChannelOpenConfirmation(Channel channel)` DOCUMENT ME!
`protected void` | `sendChannelOpenFailure(long remoteChannelId, long reasonCode, java.lang.String additionalInfo, java.lang.String languageTag)` DOCUMENT ME!
`boolean` | `sendChannelRequest(Channel channel, java.lang.String requestType, boolean wantReply, byte[] requestData)` DOCUMENT ME!
`void` | `sendChannelRequestFailure(Channel channel)` DOCUMENT ME!
`void` | `sendChannelRequestSuccess(Channel channel)` DOCUMENT ME!
`void` | `sendChannelWindowAdjust(Channel channel, long bytesToAdd)` DOCUMENT ME!
`byte[]` | `sendGlobalRequest(java.lang.String requestName, boolean wantReply, byte[] requestData)` DOCUMENT ME!
`protected void` | `sendGlobalRequestFailure()` DOCUMENT ME!
`protected void` | `sendGlobalRequestSuccess(byte[] requestData)` DOCUMENT ME!

Methods inherited from class com.sshtools.j2ssh.transport.AsyncService
`onStart, run`

Methods inherited from class com.sshtools.j2ssh.transport.Service
`getServiceName, getState, init, sendServiceAccept, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConnectionProtocol

    public ConnectionProtocol()

  Creates a new ConnectionProtocol object.

Method Detail

### addChannelFactory

    public void addChannelFactory(java.lang.String channelName,
                                  ChannelFactory cf)
                           throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channelName` - DOCUMENT ME!
    `cf` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### removeChannelFactory

    public void removeChannelFactory(java.lang.String channelName)

  DOCUMENT ME!

  Parameters:
    `channelName` - DOCUMENT ME!

### containsChannelFactory

    public boolean containsChannelFactory(java.lang.String channelName)

  DOCUMENT ME!

  Parameters:
    `channelName` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!

### allowGlobalRequest

    public void allowGlobalRequest(java.lang.String requestName,
                                   GlobalRequestHandler handler)

  DOCUMENT ME!

  Parameters:
    `requestName` - DOCUMENT ME!
    `handler` - DOCUMENT ME!

### openChannel

    public boolean openChannel(Channel channel)
                        throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### isConnected

    public boolean isConnected()

  DOCUMENT ME!

  Returns:
    DOCUMENT ME!

### openChannel

    public boolean openChannel(Channel channel,
                               ChannelEventListener eventListener)
                        throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
    `eventListener` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!
    `SshException` - DOCUMENT ME!

### onStop

    protected void onStop()

  DOCUMENT ME!

  Specified by:
    `onStop` in class `AsyncService`

### sendChannelData

    public void sendChannelData(Channel channel,
                                byte[] data)
                         throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
    `data` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendChannelEOF

    public void sendChannelEOF(Channel channel)
                        throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendChannelExtData

    public void sendChannelExtData(Channel channel,
                                   int extendedType,
                                   byte[] data)
                            throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
    `extendedType` - DOCUMENT ME!
    `data` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendChannelRequest

    public boolean sendChannelRequest(Channel channel,
                                      java.lang.String requestType,
                                      boolean wantReply,
                                      byte[] requestData)
                               throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
    `requestType` - DOCUMENT ME!
    `wantReply` - DOCUMENT ME!
    `requestData` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!
    `SshException` - DOCUMENT ME!

### sendChannelRequestFailure

    public void sendChannelRequestFailure(Channel channel)
                                   throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendChannelRequestSuccess

    public void sendChannelRequestSuccess(Channel channel)
                                   throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendChannelWindowAdjust

    public void sendChannelWindowAdjust(Channel channel,
                                        long bytesToAdd)
                                 throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
    `bytesToAdd` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendGlobalRequest

    public byte[] sendGlobalRequest(java.lang.String requestName,
                                    boolean wantReply,
                                    byte[] requestData)
                             throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `requestName` - DOCUMENT ME!
    `wantReply` - DOCUMENT ME!
    `requestData` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!
    `SshException` - DOCUMENT ME!

### getAsyncMessageFilter

    protected int[] getAsyncMessageFilter()

  DOCUMENT ME!

  Specified by:
    `getAsyncMessageFilter` in class `AsyncService`
  Returns:
    DOCUMENT ME!

### closeChannel

    protected void closeChannel(Channel channel)
                         throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### onGlobalRequest

    protected void onGlobalRequest(java.lang.String requestName,
                                   boolean wantReply,
                                   byte[] requestData)
                            throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `requestName` - DOCUMENT ME!
    `wantReply` - DOCUMENT ME!
    `requestData` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### onMessageReceived

    protected void onMessageReceived(SshMessage msg)
                              throws java.io.IOException

  DOCUMENT ME!

  Specified by:
    `onMessageReceived` in class `AsyncService`
  Parameters:
    `msg` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### onServiceAccept

    protected void onServiceAccept()

  DOCUMENT ME!

  Specified by:
    `onServiceAccept` in class `Service`

### onServiceInit

    protected void onServiceInit(int startMode)
                          throws java.io.IOException

  DOCUMENT ME!

  Specified by:
    `onServiceInit` in class `Service`
  Parameters:
    `startMode` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### onServiceRequest

    protected void onServiceRequest()

  DOCUMENT ME!

  Specified by:
    `onServiceRequest` in class `Service`

### sendChannelFailure

    protected void sendChannelFailure(Channel channel)
                               throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendChannelOpenConfirmation

    protected void sendChannelOpenConfirmation(Channel channel)
                                        throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendChannelOpenFailure

    protected void sendChannelOpenFailure(long remoteChannelId,
                                          long reasonCode,
                                          java.lang.String additionalInfo,
                                          java.lang.String languageTag)
                                   throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `remoteChannelId` - DOCUMENT ME!
    `reasonCode` - DOCUMENT ME!
    `additionalInfo` - DOCUMENT ME!
    `languageTag` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendGlobalRequestFailure

    protected void sendGlobalRequestFailure()
                                     throws java.io.IOException

  DOCUMENT ME!

  Throws:
    `java.io.IOException` - DOCUMENT ME!

### sendGlobalRequestSuccess

    protected void sendGlobalRequestSuccess(byte[] requestData)
                                     throws java.io.IOException

  DOCUMENT ME!

  Parameters:
    `requestData` - DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### freeChannel

    protected void freeChannel(Channel channel)

  DOCUMENT ME!

  Parameters:
    `channel` - DOCUMENT ME!

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD