EchoProfile (BEEP Core API)

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

## org.beepcore.beep.profile.echo
Class EchoProfile

    java.lang.Object
      |
      +--org.beepcore.beep.profile.echo.EchoProfile

All Implemented Interfaces:
  MessageListener, Profile, StartChannelListener

public class EchoProfile
extends java.lang.Object
implements Profile, StartChannelListener, MessageListener

This is the Echo profile implementation

Field Summary
`static java.lang.String` | `ECHO_URI`

Constructor Summary
`EchoProfile()`

Method Summary
`boolean` | `advertiseProfile(Session session)` Callback that determines if a profile should be advertised or not.
`void` | `closeChannel(Channel channel)` Called when the underlying BEEP framework receives a "close" element.
`StartChannelListener` | `init(java.lang.String uri, ProfileConfiguration config)` Initializes the profile and returns the `StartChannelListener` for `uri`.
`void` | `receiveMSG(Message message)` Receives a BEEP message of type MSG.
`void` | `startChannel(Channel channel, java.lang.String encoding, java.lang.String data)` Called when the underlying BEEP framework receives a "start" element.

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

Field Detail

### ECHO_URI

    public static final java.lang.String ECHO_URI

See Also:
  Constant Field Values

Constructor Detail

### EchoProfile

    public EchoProfile()

Method Detail

### init

    public StartChannelListener init(java.lang.String uri,
                                     ProfileConfiguration config)
                              throws BEEPException

  Description copied from interface: `Profile`
  Initializes the profile and returns the `StartChannelListener` for `uri`.

  Specified by:
    `init` in interface `Profile`
  Parameters:
    `uri` -
    `config` -
  Returns:
    The corresponding `StartChannelListener` for the specified uri.
  Throws:
    `BEEPException`

### startChannel

    public void startChannel(Channel channel,
                             java.lang.String encoding,
                             java.lang.String data)
                      throws StartChannelException

  Description copied from interface: `StartChannelListener`
  Called when the underlying BEEP framework receives a "start" element.

  Specified by:
    `startChannel` in interface `StartChannelListener`
  Parameters:
    `channel` - A `Channel` object which represents a channel in this `Session`.
    `data` - The content of the "profile" element selected for this channel (may be `null`).
    `encoding` - specifies whether the content of the "profile" element selected for this channel is represented as a base64-encoded string. The `encoding` is only valid if `data` is not `null`.
  Throws:
    `StartChannelException` - Throwing this exception will cause an error to be returned to the BEEP peer requesting to start a channel. The channel is then discarded.

### closeChannel

    public void closeChannel(Channel channel)
                      throws CloseChannelException

  Description copied from interface: `StartChannelListener`
  Called when the underlying BEEP framework receives a "close" element.

  Specified by:
    `closeChannel` in interface `StartChannelListener`
  Parameters:
    `channel` - `Channel` which received the close request.
  Throws:
    `CloseChannelException` - Throwing this exception will return an error to the BEEP peer requesting the close. The channel will remain open.

### advertiseProfile

    public boolean advertiseProfile(Session session)

  Description copied from interface: `StartChannelListener`
  Callback that determines if a profile should be advertised or not. The `SessionTuningProperties` can be used to determine if certain attributes are in effect before a profile is advertised, such as encryption or authentication.

  Specified by:
    `advertiseProfile` in interface `StartChannelListener`
  Parameters:
    `session` - to check other properties such as the credentials of of the session
  See Also:
    `for standard properties and their values`

### receiveMSG

    public void receiveMSG(Message message)
                    throws BEEPError

  Description copied from interface: `MessageListener`
  Receives a BEEP message of type MSG.

  Specified by:
    `receiveMSG` in interface `MessageListener`
  Parameters:
    `message` - `Message`
  Throws:
    `BEEPError`
  See Also:
    `org.beepcore.beep.core.Message`

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

Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.