Search Results for

    Show / Hide Table of Contents

    Class ComponentPort

    Definition

    Namespace:
    Tizen.Applications.ComponentBased
    Assembly:
    Tizen.Applications.ComponentBased.Port.dll

    The component port API provides functions to send and receive requests between components of component-based-application.

    [Obsolete("This has been deprecated in API14")]
    public class ComponentPort : IDisposable
    Inheritance
    object
    ComponentPort
    Implements
    IDisposable

    Constructors

    View Source

    ComponentPort(string)

    Constructs a new instance of this class.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public ComponentPort(string portName)
    Parameters
    Type Name Description
    string portName

    The name of the port to connect to.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the argument is invalid.

    OutOfMemoryException

    Thrown when the memory is insufficient.

    IOException

    Thrown when because of I/O error.

    Properties

    View Source

    PortName

    Gets the port name.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public string PortName { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    AddPrivilege(string)

    Adds a privilege to the port object.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public void AddPrivilege(string privilege)
    Parameters
    Type Name Description
    string privilege

    Privilege data specifying the access rights to be granted.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the argument is invalid.

    View Source

    Cancel()

    Cancels waiting for events.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public void Cancel()
    View Source

    Dispose()

    Releases all the resources used by the class ComponentPort.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public void Dispose()
    View Source

    Dispose(bool)

    Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    If true, disposes any disposable objects, or false not to dispose disposable objects.

    View Source

    ~ComponentPort()

    Finalizes an instance of the class ComponentPort.

    Declaration
    protected ~ComponentPort()
    View Source

    Send(string, int, object)

    Sends the request data to the specified endpoint.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public void Send(string endpoint, int timeout, object request)
    Parameters
    Type Name Description
    string endpoint

    The name of the endpoint to which the request is sent.

    int timeout

    The timeout in milliseconds, -1 to use the default timeout.

    object request

    The serializable data to send.

    Remarks

    This method sends the serialized request data to the specified endpoint. If the timeout value is not set (-1), the default timeout will be used.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the argument is invalid.

    OutOfMemoryException

    Thrown when the memory is insufficient.

    UnauthorizedAccessException

    Thrown when permission is denied.

    IOException

    Thrown when because of I/O error.

    View Source

    SendAndReceive(string, int, object)

    Sends the request data and receives the reply data.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public object SendAndReceive(string endpoint, int timeout, object request)
    Parameters
    Type Name Description
    string endpoint

    The name of the endpoint to which the request is sent.

    int timeout

    The timeout in milliseconds, -1 to use the default timeout.

    object request

    The serializable data to send.

    Returns
    Type Description
    object

    The received serializable data.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the argument is invalid.

    OutOfMemoryException

    Thrown when the memory is insufficient.

    UnauthorizedAccessException

    Thrown when permission is denied.

    IOException

    Thrown when because of I/O error.

    View Source

    SendAndReceiveAsync(string, int, object)

    Sends the request data and receives the reply data asynchronously.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public Task<object> SendAndReceiveAsync(string endpoint, int timeout, object request)
    Parameters
    Type Name Description
    string endpoint

    The name of the endpoint to which the request is sent.

    int timeout

    The timeout in milliseconds, -1 to use the default timeout.

    object request

    The serializable data to send.

    Returns
    Type Description
    Task<object>

    The received serializable data.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the argument is invalid.

    OutOfMemoryException

    Thrown when the memory is insufficient.

    UnauthorizedAccessException

    Thrown when permission is denied.

    IOException

    Thrown when because of I/O error.

    View Source

    WaitForEvent()

    Waits for events.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public void WaitForEvent()
    Remarks

    This method runs a main loop until Cancel() is called. The code in the next line will not execute until Cancel() is called. To prevent blocking the main thread, consider using the ComponentTask class instead.

    Examples
    ComponentTask task = new ComponentTask(new ComponentPort("Comm"));
    task.Start();
    View Source

    WaitForPort(string)

    Waits until the port is ready.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public static Task WaitForPort(string endpoint)
    Parameters
    Type Name Description
    string endpoint

    The name of the port

    Returns
    Type Description
    Task

    A task.

    Events

    View Source

    RequestReceived

    Occurs whenever the request is received.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public event EventHandler<RequestEventArgs> RequestReceived
    Event Type
    Type Description
    EventHandler<RequestEventArgs>
    Remarks

    The event handler receives a RequestEventArgs argument that contains information about the request. If the reply is requested, RequestEventArgs.Request should be set.

    Implements

    IDisposable
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX