org.jini.rio.core
Class ServiceBeanInstance

java.lang.Object
  extended by org.jini.rio.core.ServiceBeanInstance
All Implemented Interfaces:
Serializable

public class ServiceBeanInstance
extends Object
implements Serializable

This class indicates an instance of an instantiated ServiceBean

See Also:
Serialized Form

Constructor Summary
ServiceBeanInstance(Uuid identifier, MarshalledInstance mi, ServiceBeanConfig sbConfig)
          Create a ServiceBeanInstance
ServiceBeanInstance(Uuid identifier, MarshalledInstance mi, ServiceBeanConfig sbConfig, String hostAddress)
          Create a ServiceBeanInstance
 
Method Summary
 boolean equals(Object obj)
          A ServiceBeanInstance is equal to another ServiceBeanInstance if the service identifier properties are equal
 String getHostAddress()
          Get the IP address of the compute resource the service is executing on
 MarshalledInstance getMarshalledInstance()
          Get the MarshalledInstance
 Object getService()
          Get the object used to communicate to the ServiceBean
 ServiceBeanConfig getServiceBeanConfig()
          Get the ServiceBeanConfig for the ServiceBean
 Uuid getServiceBeanID()
          Get the unique identifier for the ServiceBean
 int hashCode()
          Override hashCode to be the hash of the service identifier
 void setServiceBeanConfig(ServiceBeanConfig sbConfig)
          Set the ServiceBeanConfig for the ServiceBean
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceBeanInstance

public ServiceBeanInstance(Uuid identifier,
                           MarshalledInstance mi,
                           ServiceBeanConfig sbConfig)
Create a ServiceBeanInstance

Parameters:
identifier - Unique identifier for the ServiceBean
mi - Object used to communicate to the ServiceBean
sbConfig - ServiceBeanConfig object for the ServiceBean

ServiceBeanInstance

public ServiceBeanInstance(Uuid identifier,
                           MarshalledInstance mi,
                           ServiceBeanConfig sbConfig,
                           String hostAddress)
Create a ServiceBeanInstance

Parameters:
identifier - Unique identifier for the ServiceBean
mi - Object used to communicate to the ServiceBean
sbConfig - ServiceBeanConfig object for the ServiceBean
hostAddress - The hostAddress the service is executing on
Method Detail

getServiceBeanID

public Uuid getServiceBeanID()
Get the unique identifier for the ServiceBean

Returns:
Unique identifier for the ServiceBean

getMarshalledInstance

public MarshalledInstance getMarshalledInstance()
Get the MarshalledInstance

Returns:
The MarshalledInstance for the service proxy

getService

public Object getService()
                  throws IOException,
                         ClassNotFoundException
Get the object used to communicate to the ServiceBean

Returns:
Object used to communicate to the ServiceBean
Throws:
ClassNotFoundException
IOException

setServiceBeanConfig

public void setServiceBeanConfig(ServiceBeanConfig sbConfig)
Set the ServiceBeanConfig for the ServiceBean

Parameters:
sbConfig - The ServiceBeanConfig for the ServiceBean

getServiceBeanConfig

public ServiceBeanConfig getServiceBeanConfig()
Get the ServiceBeanConfig for the ServiceBean

Returns:
The ServiceBeanConfig for the ServiceBean

getHostAddress

public String getHostAddress()
Get the IP address of the compute resource the service is executing on

Returns:
The IP address of of the compute resource the service is executing on. This value may be null

hashCode

public int hashCode()
Override hashCode to be the hash of the service identifier

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
A ServiceBeanInstance is equal to another ServiceBeanInstance if the service identifier properties are equal

Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2005 Sun Microsystems, Inc.
Copyright (c) 2006 GigaSpaces Technologies, Inc.
All Rights Reserved.