org.simantics.databoard.method
Interface MethodInterface

All Known Implementing Classes:
Client, TcpConnection

public interface MethodInterface

MethodInterface is an interface for invoking methods.

If MethodInterface is executed on TCP/IP socket, the current Connection can be acquired with Connection#getCurrentConnection(). You can attach close listener this way.

MethodInterface may be used from multiple-threads simultaneously.

Author:
Toni Kalajainen , Hannu Niemisto
See Also:
puts a MethodInterface in a server socket, creates a MethodInterface from a socket connection, to create MethodInterface from an interface, to create MethodInterface implementation from an object

Nested Class Summary
static class MethodInterface.AsyncRequestStatus
           
static interface MethodInterface.AsyncResult
           
static class MethodInterface.ExecutionError
          A wrapper to an error that occured in the execution of the method.
static interface MethodInterface.InvokeListener
           
static interface MethodInterface.Method
          Access to the implementation of a method.
 
Method Summary
 Interface getInterface()
          Get method descriptions
 MethodInterface.Method getMethod(MethodTypeBinding binding)
          Get an access to the implementation of a method.
 MethodInterface.Method getMethod(MethodTypeDefinition description)
          Get an access to the implementation of a method.
 

Method Detail

getInterface

Interface getInterface()
Get method descriptions

Returns:
method descriptions

getMethod

MethodInterface.Method getMethod(MethodTypeDefinition description)
                                 throws MethodNotSupportedException
Get an access to the implementation of a method. The binding is suggested by the producer.

Parameters:
description - method description
Returns:
method access
Throws:
MethodNotSupportedException

getMethod

MethodInterface.Method getMethod(MethodTypeBinding binding)
                                 throws MethodNotSupportedException
Get an access to the implementation of a method. The binding is suggested by the consumer.

Parameters:
binding - binding to use
Returns:
method access
Throws:
MethodNotSupportedException