org.apache.jcs.utils.discovery
Class UDPDiscoveryMessage

java.lang.Object
  extended by org.apache.jcs.utils.discovery.UDPDiscoveryMessage
All Implemented Interfaces:
Serializable

public class UDPDiscoveryMessage
extends Object
implements Serializable

The message sent by the discovery mechanism.

See Also:
Serialized Form

Field Summary
static int PASSIVE_BROADCAST
          This is the periodic broadcast of a servers location.
static int REMOVE_BROADCAST
          This message instructs the receiver to remove this service from its list.
static int REQUEST_BROADCAST
          This asks recipients to broadcast their location.
 
Constructor Summary
UDPDiscoveryMessage()
           
 
Method Summary
 ArrayList getCacheNames()
           
 String getHost()
           
 int getMessageType()
           
 int getPort()
           
 long getRequesterId()
           
 void setCacheNames(ArrayList cacheNames)
           
 void setHost(String host)
           
 void setMessageType(int messageType)
           
 void setPort(int port)
           
 void setRequesterId(long requesterId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PASSIVE_BROADCAST

public static final int PASSIVE_BROADCAST
This is the periodic broadcast of a servers location. This type of message is also sent in response to a REQUEST_BROADCAST.

See Also:
Constant Field Values

REQUEST_BROADCAST

public static final int REQUEST_BROADCAST
This asks recipients to broadcast their location. This is used on startup.

See Also:
Constant Field Values

REMOVE_BROADCAST

public static final int REMOVE_BROADCAST
This message instructs the receiver to remove this service from its list.

See Also:
Constant Field Values
Constructor Detail

UDPDiscoveryMessage

public UDPDiscoveryMessage()
Method Detail

setPort

public void setPort(int port)
Parameters:
port - The port to set.

getPort

public int getPort()
Returns:
Returns the port.

setHost

public void setHost(String host)
Parameters:
host - The host to set.

getHost

public String getHost()
Returns:
Returns the host.

setRequesterId

public void setRequesterId(long requesterId)
Parameters:
requesterId - The requesterId to set.

getRequesterId

public long getRequesterId()
Returns:
Returns the requesterId.

setMessageType

public void setMessageType(int messageType)
Parameters:
messageType - The messageType to set.

getMessageType

public int getMessageType()
Returns:
Returns the messageType.

setCacheNames

public void setCacheNames(ArrayList cacheNames)
Parameters:
cacheNames - The cacheNames to set.

getCacheNames

public ArrayList getCacheNames()
Returns:
Returns the cacheNames.

toString

public String toString()
Overrides:
toString in class Object
Returns:
debugging string


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.