JBoss Remoting 3.1.0.Beta1

org.jboss.remoting3
Interface Endpoint.ServiceBuilder<I,O>

Type Parameters:
I - the request type
O - the reply type
Enclosing interface:
Endpoint

public static interface Endpoint.ServiceBuilder<I,O>

A service builder for new service registration.


Method Summary
 Registration register()
          Register the service.
 Endpoint.ServiceBuilder<I,O> setClientListener(ClientListener<? super I,? extends O> clientListener)
          Set the request listener.
 Endpoint.ServiceBuilder<I,O> setGroupName(String groupName)
          Set the group name.
 Endpoint.ServiceBuilder<I,O> setOptionMap(org.jboss.xnio.OptionMap optionMap)
          Set the option map for the service.
<N> Endpoint.ServiceBuilder<I,N>
setReplyType(Class<N> newReplyType)
          Clear the configured client listener and set a new reply type.
<N> Endpoint.ServiceBuilder<N,O>
setRequestType(Class<N> newRequestType)
          Clear the configured client listener and set a new request type.
 Endpoint.ServiceBuilder<I,O> setServiceType(String serviceType)
          Set the service type string, which should follow the convention for package names (reversed domain names).
 

Method Detail

setGroupName

Endpoint.ServiceBuilder<I,O> setGroupName(String groupName)
Set the group name.

Parameters:
groupName - the group name
Returns:
this builder

setServiceType

Endpoint.ServiceBuilder<I,O> setServiceType(String serviceType)
Set the service type string, which should follow the convention for package names (reversed domain names).

Parameters:
serviceType - the service type
Returns:
this builder

setRequestType

<N> Endpoint.ServiceBuilder<N,O> setRequestType(Class<N> newRequestType)
Clear the configured client listener and set a new request type.

Type Parameters:
N - the new request type
Parameters:
newRequestType - the new request type's class
Returns:
this builder, cast to include the new request type

setReplyType

<N> Endpoint.ServiceBuilder<I,N> setReplyType(Class<N> newReplyType)
Clear the configured client listener and set a new reply type.

Type Parameters:
N - the new reply type
Parameters:
newReplyType - the new reply type's class
Returns:
this builder, cast to include the new reply type

setClientListener

Endpoint.ServiceBuilder<I,O> setClientListener(ClientListener<? super I,? extends O> clientListener)
Set the request listener. The given listener may be configured to accept a superclass of the given request type, or a subclass of the given reply type, since they are compatible.

Parameters:
clientListener - the request listener
Returns:
this builder

setOptionMap

Endpoint.ServiceBuilder<I,O> setOptionMap(org.jboss.xnio.OptionMap optionMap)
Set the option map for the service. The options may include, but are not limited to:

Parameters:
optionMap - the option map
Returns:
this builder

register

Registration register()
                      throws IOException
Register the service.

You must have the registerService EndpointPermission to invoke this method.

Returns:
a registration handle
Throws:
IOException - if a problem occurs with registration

JBoss Remoting 3.1.0.Beta1

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