org.softamis.cluster4spring.support
Class ServiceMoniker

java.lang.Object
  extended by org.softamis.cluster4spring.support.ServiceMoniker
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class ServiceMoniker
extends java.lang.Object
implements java.io.Externalizable

Class contains information about location of single service. Such information includes - type of server where service resides, server ID and url used to access service. EndpointFactory will create Endpoint using information stored in ServiceMoniker

Author:
Andrew Sazonov
See Also:
Endpoint, EndpointFactory, ExporterAcceptor, Serialized Form

Field Summary
protected  long fServerID
          Internal ID of server within cluster
protected  java.lang.String fServerType
          Type of server.
protected  java.lang.String fServiceURL
          URL of the service.
 
Constructor Summary
ServiceMoniker()
           
ServiceMoniker(long aServerID, java.lang.String aServiceURL)
           
ServiceMoniker(long aServerID, java.lang.String aServiceGroup, java.lang.String aServiceURL)
           
ServiceMoniker(java.lang.String aServiceURL)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 long getServerID()
           
 java.lang.String getServerType()
           
 java.lang.String getServiceURL()
           
 int hashCode()
           
 void readExternal(java.io.ObjectInput in)
           
 void setServerID(long aServerID)
           
 void setServerType(java.lang.String aServerType)
           
 void setServiceURL(java.lang.String aServiceURL)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

fServerType

protected java.lang.String fServerType
Type of server.

See Also:
AbstractServicePublisher.fServerType

fServerID

protected long fServerID
Internal ID of server within cluster


fServiceURL

protected java.lang.String fServiceURL
URL of the service.

Constructor Detail

ServiceMoniker

public ServiceMoniker()

ServiceMoniker

public ServiceMoniker(java.lang.String aServiceURL)

ServiceMoniker

public ServiceMoniker(long aServerID,
                      java.lang.String aServiceGroup,
                      java.lang.String aServiceURL)

ServiceMoniker

public ServiceMoniker(long aServerID,
                      java.lang.String aServiceURL)
Method Detail

getServerID

public long getServerID()

setServerID

public void setServerID(long aServerID)

getServiceURL

public java.lang.String getServiceURL()

setServiceURL

public void setServiceURL(java.lang.String aServiceURL)

getServerType

public java.lang.String getServerType()

setServerType

public void setServerType(java.lang.String aServerType)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object