DirectSENPInterface (Siena 2.0.4 API Documentation)
Date: 2015-05-17

siena

## Class DirectSENPInterface

- java.lang.Object
- - siena.DirectSENPInterface

-     public class DirectSENPInterface
      extends java.lang.Object

  low-level interface to the Siena event notification service.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirectSENPInterface(java.lang.String server)` creates and connects to a given Siena server.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `advertise(Filter f, java.lang.String id)`
    `void` | `configure(java.lang.String handler)` switch to a different master server (possibly null)
    `void` | `mapHandler(java.lang.String id, java.lang.String handler)`
    `static void` | `processNotification(Notifiable n, PacketReceiver r)`
    `void` | `publish(Notification n)`
    `void` | `resume(java.lang.String id)` resumes the delivery of notifications for a given subscriber This causes the Siena (master) server to resume sending notification to the given subscriber.
    `static void` | `setDefaultPacketSenderFactory(PacketSenderFactory f)` default packet-sender factory for DireactSENPInterface objects every new object is assigned this factory
    `void` | `setPacketSenderFactory(PacketSenderFactory f)` sets the packet-sender factory associated with this SENP interface the packet sender factory is used every time this interface is connected to a new master server through `setServer(String)`
    `void` | `setServer(java.lang.String server)` connectes to a given Siena server.
    `void` | `shutdown()`
    `void` | `subscribe(Filter f, java.lang.String id, java.lang.String handler)`
    `void` | `subscribe(Pattern p, java.lang.String id, java.lang.String handler)`
    `void` | `suspend(java.lang.String id)` suspends the delivery of notifications for a given subscriber.
    `void` | `unadvertise(Filter f, java.lang.String id)`
    `void` | `unadvertiseAll(java.lang.String id)`
    `void` | `unsubscribe(Filter f, java.lang.String id, java.lang.String handler)`
    `void` | `unsubscribe(Pattern p, java.lang.String id, java.lang.String handler)`
    `void` | `unsubscribeAll(java.lang.String id)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DirectSENPInterface

          public DirectSENPInterface(java.lang.String server)
                              throws InvalidSenderException

      creates and connects to a given Siena server.
      Parameters:
        `server` - the uri of the server to connect to (e.g., "ka:host.domain.net:7654")
      Throws:
        `InvalidSenderException`

  - ### Method Detail

    - #### setPacketSenderFactory

          public void setPacketSenderFactory(PacketSenderFactory f)

      sets the packet-sender factory associated with this SENP interface the packet sender factory is used every time this interface is connected to a new master server through `setServer(String)`
      See Also:
        `setDefaultPacketSenderFactory(PacketSenderFactory)`

    - #### setDefaultPacketSenderFactory

          public static void setDefaultPacketSenderFactory(PacketSenderFactory f)

      default packet-sender factory for DireactSENPInterface objects every new object is assigned this factory
      See Also:
        `setPacketSenderFactory(PacketSenderFactory)`

    - #### setServer

          public void setServer(java.lang.String server)
                         throws InvalidSenderException

      connectes to a given Siena server.
      Parameters:
        `server` - the uri of the server to connect to (e.g., "ka:host.domain.net:7654")
      Throws:
        `InvalidSenderException`

    - #### suspend

          public void suspend(java.lang.String id)
                       throws SienaException

      suspends the delivery of notifications for a given subscriber. This causes the Siena server to stop sending notification to the given subscriber. The server correctly maintains all the existing subscriptions so that the flow of notification can be later resumed (with `resume(String)`).
      Parameters:
        `id` - identity of the subscriber
      Throws:
        `SienaException`
      See Also:
        `resume(String)`

    - #### resume

          public void resume(java.lang.String id)
                      throws SienaException

      resumes the delivery of notifications for a given subscriber This causes the Siena (master) server to resume sending notification to the given subscriber.
      Throws:
        `SienaException`
      See Also:
        `suspend(String)`

    - #### unsubscribeAll

          public void unsubscribeAll(java.lang.String id)
                              throws SienaException

      Throws:
        `SienaException`

    - #### publish

          public void publish(Notification n)
                       throws SienaException

      Throws:
        `SienaException`

    - #### subscribe

          public void subscribe(Filter f,
                       java.lang.String id,
                       java.lang.String handler)
                         throws SienaException

      Throws:
        `SienaException`

    - #### subscribe

          public void subscribe(Pattern p,
                       java.lang.String id,
                       java.lang.String handler)
                         throws SienaException

      Throws:
        `SienaException`

    - #### unsubscribe

          public void unsubscribe(Filter f,
                         java.lang.String id,
                         java.lang.String handler)
                           throws SienaException

      Throws:
        `SienaException`

    - #### unsubscribe

          public void unsubscribe(Pattern p,
                         java.lang.String id,
                         java.lang.String handler)
                           throws SienaException

      Throws:
        `SienaException`

    - #### mapHandler

          public void mapHandler(java.lang.String id,
                        java.lang.String handler)
                          throws SienaException

      Throws:
        `SienaException`

    - #### configure

          public void configure(java.lang.String handler)
                         throws SienaException

      switch to a different master server (possibly null)
      Throws:
        `SienaException`

    - #### shutdown

          public void shutdown()
                        throws SienaException

      Throws:
        `SienaException`

    - #### advertise

          public void advertise(Filter f,
                       java.lang.String id)
                         throws SienaException

      Throws:
        `SienaException`

    - #### unadvertise

          public void unadvertise(Filter f,
                         java.lang.String id)
                           throws SienaException

      Throws:
        `SienaException`

    - #### unadvertiseAll

          public void unadvertiseAll(java.lang.String id)
                              throws SienaException

      Throws:
        `SienaException`

    - #### processNotification

          public static void processNotification(Notifiable n,
                                 PacketReceiver r)
                                          throws SienaException

      Throws:
        `SienaException`

Copyright © 2000-2005 University of Colorado.
Copyright © 2005-2011 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga