JBoss Remoting 3.1.0.Beta1

org.jboss.remoting3.spi
Interface RemotingServiceDescriptor<T>

All Known Implementing Classes:
RemoteProtocolDescriptor

public interface RemotingServiceDescriptor<T>

A descriptor for automatically-discovered remoting service types. Since instances of this interface are constructed automatically, implementing classes should have a no-arg constructor.

To add an automatically-discovered service, create a file called "META-INF/services/org.jboss.remoting3.spi.RemotingServiceDescriptor" and populate it with the names of classes that implement this interface.

See Also:
ServiceLoader

Method Summary
 String getName()
          Get the name of this service.
 T getService(Properties properties)
          Get the service to associate with the given name.
 Class<T> getType()
          Get the type of service provided by this descriptor.
 

Method Detail

getType

Class<T> getType()
Get the type of service provided by this descriptor. Only the following types are supported: Other types are ignored, allowing new types to be added in the future while maintaining compatibility with older versions.

Returns:
the type of remoting service

getName

String getName()
Get the name of this service.

Returns:
the name

getService

T getService(Properties properties)
             throws IOException
Get the service to associate with the given name. The given properties were used to configure the endpoint, and may be used to configure additional properties of this provider.

Parameters:
properties - the properties used to configure the endpoint
Returns:
the service
Throws:
IOException - if the instance could not be produced

JBoss Remoting 3.1.0.Beta1

Copyright © 2010 JBoss, a division of Red Hat, Inc.