# Service (sshj 0.4.1 API)
Date: 2011-06-19

## net.schmizz.sshj
Interface Service

All Superinterfaces:
  ErrorNotifiable, SSHPacketHandler

All Known Implementing Classes:
  AbstractService, ConnectionImpl, UserAuthImpl

    public interface Service

extends SSHPacketHandler, ErrorNotifiable

Represents a service running on top of the SSH transport layer.

Nested Class Summary

Nested classes/interfaces inherited from interface net.schmizz.sshj.common.ErrorNotifiable
`ErrorNotifiable.Util`

Method Summary
`String` `getName()`
`void` `notifyUnimplemented(long seqNum)` Notifies this service that a `SSH_MSG_UNIMPLEMENTED` was received for packet with given sequence number.
`void` `request()` Request and install this service with the associated transport.

Methods inherited from interface net.schmizz.sshj.common.SSHPacketHandler
`handle`

Methods inherited from interface net.schmizz.sshj.common.ErrorNotifiable
`notifyError`

Method Detail

### getName

    String getName()

  Returns:
    the assigned name for this SSH service.

### notifyUnimplemented

    void notifyUnimplemented(long seqNum)
                             throws SSHException

  Notifies this service that a `SSH_MSG_UNIMPLEMENTED` was received for packet with given sequence number. Meant to be invoked as a callback by the transport layer.

  Parameters:
    `seqNum` - sequence number of the packet which the server claims is unimplemented
  Throws:
    `SSHException` - if the packet is unexpected and may represent a disruption

### request

    void request()
                 throws TransportException

  Request and install this service with the associated transport. Implementations should aim to make this method idempotent by first checking the `Transport.getService()` currently active service}.

  Throws:
    `TransportException` - if there is an error sending the service request

Copyright © 2009-2011. All Rights Reserved.