站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 varia API Documentation 英文版文档

ServiceBinding (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档


org.jboss.services.binding
Class ServiceBinding

java.lang.Object
  extended byorg.jboss.services.binding.ServiceBinding
All Implemented Interfaces:
Cloneable

public class ServiceBinding
extends Object
implements Cloneable

A ServiceBinding is a {name,virtualHost,port,interfaceAddress} quad specifying a named binding for a service.

Version:
$Revision: 1.2 $
Author:
Mike Finn., Scott.Stark@jboss.org

Constructor Summary
ServiceBinding(String name, String hostName, int port)
          Creates a new instance of ServiceDescriptor
 
Method Summary
 Object clone()
          Make a copy of the ServiceBinding
 InetAddress getBindAddress()
          Gets the bindAddress attribute of the ServiceDescriptor object
 String getHostName()
          Returns host name
 String getName()
          Getter for property name.
 int getPort()
          Gets the port attribute of the ServiceDescriptor object
 void setBindAddress(InetAddress bindAddress)
          Sets the bindAddress attribute of the ServiceDescriptor object
 void setBindAddress(String hostName)
          Sets the bindAddress, given a hostname
 void setHostName(String hostName)
          Sets the host name
 void setName(String name)
          Setter for property name.
 void setPort(int port)
          Sets the port attribute of the ServiceDescriptor object
 String toString()
          Create string representation of the service descriptor
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceBinding

public ServiceBinding(String name,
                      String hostName,
                      int port)
               throws UnknownHostException
Creates a new instance of ServiceDescriptor

Parameters:
name - The name of the binding. A null or empty name implies that default binding for a service.
hostName - The virtual host name. This is the interface name used to construct the bindAddress value. A null value implies bind on any interface.
port - The port the service should listen on. A 0 value implies an anonymous port.
Throws:
UnknownHostException - If hostName is not resolvable.
Method Detail

clone

public Object clone()
Make a copy of the ServiceBinding


getName

public String getName()
Getter for property name.

Returns:
The name of the binding

setName

public void setName(String name)
Setter for property name.

Parameters:
name - the name of the binding

setBindAddress

public void setBindAddress(InetAddress bindAddress)
Sets the bindAddress attribute of the ServiceDescriptor object


setBindAddress

public void setBindAddress(String hostName)
                    throws UnknownHostException
Sets the bindAddress, given a hostname

Throws:
UnknownHostException - Hostname is not resolvable

getBindAddress

public InetAddress getBindAddress()
Gets the bindAddress attribute of the ServiceDescriptor object

Returns:
The listen address

setPort

public void setPort(int port)
Sets the port attribute of the ServiceDescriptor object


getPort

public int getPort()
Gets the port attribute of the ServiceDescriptor object

Returns:
The listen port number

getHostName

public String getHostName()
Returns host name

Returns:
the hostname or address

setHostName

public void setHostName(String hostName)
Sets the host name


toString

public String toString()
Create string representation of the service descriptor

Returns:
String containing service descriptor properties


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.