Sybase ESP .NET SDK  5.0 ESD#1
NetEspPublisher Class Reference

List of all members.

Public Types

enum  NET_ESP_PUBLISHER_EVENT {
  NET_ESP_PUBLISHER_EVENT_CONNECTED = 0x05000002, NET_ESP_PUBLISHER_EVENT_DISCONNECTED = 0x05000004, NET_ESP_PUBLISHER_EVENT_CLOSED = 0x05000008, NET_ESP_PUBLISHER_EVENT_READY = 0x0500000A,
  NET_ESP_PUBLISHER_EVENT_ERROR = 0x05000010, NET_ESP_PUBLISHER_EVENT_ALL = 0x050000FF
}

Public Member Functions

delegate void PUBLISHER_EVENT_CALLBACK (NetEspPublisherEvent^ event, IntPtr^ data)
 NetEspPublisher (ESP_SDK_NAMESPACE::EspPublisher *nPublisher)
ESP_SDK_NAMESPACE::EspPublisher * getEspPublisher ()
int32_t init (NetEspProject^ project, String^ host, int port, NetEspPublisherOptions^ options, NetEspCredentials^ creds, int token, NetEspError^ error)
NetEspProjectget_project (NetEspError^ error)
int32_t connect (NetEspError^ error)
int32_t disconnect (NetEspError^ error)
int32_t close (NetEspError^ error)
int32_t publish (NetEspMessageWriter^ writer, NetEspError^ error)
int32_t commit (NetEspError^ error)
NetEspMessageWriterget_message_writer (NetEspStream^ stream, NetEspError^ error)
int32_t set_callback (uint32_t events, PUBLISHER_EVENT_CALLBACK^ callback, IntPtr^ user_data, NetEspError^ error)
int32_t remove_callback (PUBLISHER_EVENT_CALLBACK^ callback, NetEspError^ error)
int32_t select_with (NetEspSelector^ selector, uint32_t events, NetEspError^ error)

Member Function Documentation

int32_t NetEspPublisher::close ( NetEspError error)

Closes the publisher. This object will no longer be accessible. In DIRECT access mode the call returns when the publisher is closed. In CALLBACK/SELECT will generate an NET_ESP_PUBLISHER_CLOSED event.

int32_t NetEspPublisher::connect ( NetEspError error)

Connects to the project the publisher will be publishing to. In DIRECT access the call will return when the publisher has connected. In CALLBACK/SELECT the call returns immediately. Completion is indicated by the generation of an NET_ESP_PUBLISHER_CONNECTED event.

int32_t NetEspPublisher::disconnect ( NetEspError error)

Disconnects the publisher from the project. In DIRECT mode call returns when the publisher has disconnected. In CALLBACK/SELECT will generate an NET_ESP_PUBLISHER_DISCONNECTED event.

NetEspMessageWriter NetEspPublisher::get_message_writer ( NetEspStream stream,
NetEspError error 
)

Retrieves a NetEspMessageWriter that can be used to build single row or blocked messages to send to the project.

NetEspProject NetEspPublisher::get_project ( NetEspError error)

Retrieves the parent NetEspProject for this publisher.

int32_t NetEspPublisher::publish ( NetEspMessageWriter writer,
NetEspError error 
)

Publishes the data currently in the passed EspMessageWriter. The actual behavior of this function depends on a number of factors, viz. the access mode, buffering if any and whether synchronous publishing is in effect.

int32_t NetEspPublisher::remove_callback ( PUBLISHER_EVENT_CALLBACK^  callback,
NetEspError error 
)

Deregisters the specified callback handler for the publisher.

int32_t NetEspPublisher::select_with ( NetEspSelector selector,
uint32_t  events,
NetEspError error 
)

Register the NetEspPublisher with the specified NetEspSelector object. Used for SELECTION mode access.

int32_t NetEspPublisher::set_callback ( uint32_t  events,
PUBLISHER_EVENT_CALLBACK^  callback,
IntPtr^  user_data,
NetEspError error 
)

Sets the callback handler if the publisher was created using CALLBACK access mode.