ch.ethz.iks.r_osgi.channels
Interface ChannelEndpoint

All Known Implementing Classes:
ChannelEndpointImpl

public interface ChannelEndpoint

The endpoint of a channel to a connected remote peer.

Since:
0.6
Author:
Jan S. Rellermeyer, ETH Zurich

Method Summary
 void dispose()
          dispose of the channel endpoint.
 java.util.Dictionary getPresentationProperties(java.lang.String service)
          get the attributes for the presentation of the service.
 java.util.Dictionary getProperties(java.lang.String service)
          get the attributes of a service.
 URI getRemoteAddress()
          get the URI of the remote channel endpoint.
 java.lang.Object invokeMethod(java.lang.String service, java.lang.String methodSignature, java.lang.Object[] args)
          invoke a method on the remote host.
 void receivedMessage(RemoteOSGiMessage msg)
          callback for NetworkChannels.
 void trackRegistration(java.lang.String service, org.osgi.framework.ServiceRegistration reg)
          register a proxied service registration to allow updates of the properties.
 void untrackRegistration(java.lang.String service)
          unregister a proxied service registration.
 

Method Detail

receivedMessage

void receivedMessage(RemoteOSGiMessage msg)
callback for NetworkChannels.

Parameters:
msg - the message.
Since:
0.6

invokeMethod

java.lang.Object invokeMethod(java.lang.String service,
                              java.lang.String methodSignature,
                              java.lang.Object[] args)
                              throws java.lang.Throwable
invoke a method on the remote host. This function is used by all proxy bundles.

Parameters:
service - the URI of the service.
methodSignature - the signature of the method.
args - the method parameter.
Returns:
the result of the remote method invokation.
Throws:
java.lang.Throwable - can be either a local exception or an exception that occured on the original service method.
Since:
0.6

getProperties

java.util.Dictionary getProperties(java.lang.String service)
get the attributes of a service. This function is used to simplify proxy bundle generation.

Parameters:
service - the URI of the remote service.
Returns:
the service attributes.
Since:
0.6

getPresentationProperties

java.util.Dictionary getPresentationProperties(java.lang.String service)
get the attributes for the presentation of the service. This function is used by proxies that support ServiceUI presentations.

Parameters:
service - the URI of the remote service.
Returns:
the attributes for the presentation.
Since:
0.6

trackRegistration

void trackRegistration(java.lang.String service,
                       org.osgi.framework.ServiceRegistration reg)
register a proxied service registration to allow updates of the properties.

Parameters:
service - the URI of the service.
reg - the service registration object.

untrackRegistration

void untrackRegistration(java.lang.String service)
unregister a proxied service registration.

Parameters:
service - the URI of the service.
reg - the service registration object.

getRemoteAddress

URI getRemoteAddress()
get the URI of the remote channel endpoint.

Returns:
the channel URI.

dispose

void dispose()
dispose of the channel endpoint.



Copyright © 2009 IKS, ETH Zurich. All Rights Reserved.