org.jboss.services.binding.impl
Class SimpleServiceBindingValueSourceImpl

java.lang.Object
  extended by org.jboss.services.binding.impl.SimpleServiceBindingValueSourceImpl
All Implemented Interfaces:
InetAddressServiceBindingValueSource, IntServiceBindingValueSource, ServiceBindingValueSource

public class SimpleServiceBindingValueSourceImpl
extends Object
implements IntServiceBindingValueSource, InetAddressServiceBindingValueSource

ServiceBindingValueSource that returns the given binding's bind address and port. Does not perform any transformations.

Version:
$Revision: 82920 $
Author:
Brian Stansberry

Constructor Summary
SimpleServiceBindingValueSourceImpl()
           
 
Method Summary
 InetAddress getInetAddressServiceBindingValue(ServiceBinding binding)
          Returns the InetAddress to use for the binding value.
 int getIntServiceBindingValue(ServiceBinding binding)
          Returns the int to use for the binding value.
 Object getServiceBindingValue(ServiceBinding binding, Object... params)
          Returns a detyped binding value based on the provided binding and detyped array of parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleServiceBindingValueSourceImpl

public SimpleServiceBindingValueSourceImpl()
Method Detail

getIntServiceBindingValue

public int getIntServiceBindingValue(ServiceBinding binding)
Description copied from interface: IntServiceBindingValueSource
Returns the int to use for the binding value.

Specified by:
getIntServiceBindingValue in interface IntServiceBindingValueSource
Parameters:
binding - the binding. Cannot be null
Returns:
binding.getPort()

getInetAddressServiceBindingValue

public InetAddress getInetAddressServiceBindingValue(ServiceBinding binding)
Description copied from interface: InetAddressServiceBindingValueSource
Returns the InetAddress to use for the binding value.

Specified by:
getInetAddressServiceBindingValue in interface InetAddressServiceBindingValueSource
Parameters:
binding - the binding. Cannot be null
Returns:
binding.getBindAddress()

getServiceBindingValue

public Object getServiceBindingValue(ServiceBinding binding,
                                     Object... params)
Description copied from interface: ServiceBindingValueSource
Returns a detyped binding value based on the provided binding and detyped array of parameters.

Specified by:
getServiceBindingValue in interface ServiceBindingValueSource
Parameters:
binding - the binding. Cannot be null
params - the parameters, or null
Returns:
new Integer(binding.getPort())


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.