eneter.messaging.endpoints.rpc
Interface IRpcService<TServiceInterface>

Type Parameters:
TServiceInterface - Service interface. The provided service type must be an interface fulfilling following criteria: The following example shows how to declare a service interface.
 // Declaring the service.
 public interface IHello
 {
     // Declares event which notifies String.
     // Note: This event would not be compatible in cross Java/C# communication.
     Event<String> someEventHappend();
     
     // Declares event which notifies EventArgs.
     // Note: event arguments derived from EventArgs can be used in cross Java/C# communication.
     Event<EventArgs> otherEventHappened();
     
     // Declares method taking arguments and returning a value.
     int calculate(int a, int b);
     
     // Declares method taking arguments and returning void.
     // Note: MyArgumentType must be serializable. It means the serializer used for the communication
     //       must be able to serialize it.
     void performSomething(MyArgumentType param); 
 }
 
 
The following example shows how to declare interface that can be used for Java/C# communication.
 // C# interface
 public interface IMyInterface
 {
    // Event without arguments.
    event EventHandler SomethingHappened;
    
    // Event with arguments.
    event EventHandler<MyEventArgs> SomethingElseHappened;
    
    // Simple method.
    void DoSomething();
    
    // Method with arguments.
    int Calculate(int a, int b);
 }
 .
 // Java equivalent
 // Note: Names of methods and events must be same. So e.g. if the interface is declared in .NET with
 //       then you may need to start method names with Capital.
 public interface IMyInterface
 {
    // Event without arguments.
    Event<EventArgs> SomethingHappened();
    
    // Event with arguments.
    Event<MyArgs> SomethingElseHappened();
    
    // Simple method.
    void DoSomething();
    
    // Method with arguments.
    int Calculate(int a, int b);
 }
 
 
All Superinterfaces:
IAttachableDuplexInputChannel

public interface IRpcService<TServiceInterface>
extends IAttachableDuplexInputChannel

Service which exposes the interface for Remote Procedure Call (note: it also works with .NET). RpcService acts as a stub which provides the communication functionality for an instance implementing the given service interface.


Method Summary
 Event<ResponseReceiverEventArgs> responseReceiverConnected()
          Event raised when a client connected the service.
 Event<ResponseReceiverEventArgs> responseReceiverDisconnected()
          Event raised when a client got disconnected from the service.
 
Methods inherited from interface eneter.messaging.infrastructure.attachable.IAttachableDuplexInputChannel
attachDuplexInputChannel, detachDuplexInputChannel, getAttachedDuplexInputChannel, isDuplexInputChannelAttached
 

Method Detail

responseReceiverConnected

Event<ResponseReceiverEventArgs> responseReceiverConnected()
Event raised when a client connected the service.

Returns:

responseReceiverDisconnected

Event<ResponseReceiverEventArgs> responseReceiverDisconnected()
Event raised when a client got disconnected from the service.

Returns: