Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.remote
Class AbstractClusteringService

java.lang.Object
  extended byoracle.toplink.remote.AbstractClusteringService

All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
AbstractJNDIClusteringService, RMIClusteringService

public abstract class AbstractClusteringService
extends java.lang.Object
implements java.lang.Runnable

Purpose:To Provide a framework for offering customers the ability to automatically connect multiple sessions for synchrnization.

Descripton:This thread object will place a remote dispatcher in a globally available space. it will also monitor the specified multicast socket to allow other sessions to connect.

See Also:
CacheSynchronizationManager

Constructor Summary
AbstractClusteringService(Session session)
PUBLIC: Creates an AbstractClusteringService
AbstractClusteringService(java.lang.String multicastAddress, int multicastPort, Session session)
ADVANCED: Creates an AbstractClusteringService

Method Summary
abstract oracle.toplink.internal.remote.RemoteConnection createRemoteConnection(java.lang.String sessionId, java.lang.String jndiHostURL)
ADVANCED: This method should return a remote connection of the appropraite type for use in the synchronizatio
abstract void deregisterDispatcher()
ADVANCED: This method will deregister the dispatcher for this session from JNDI on the specified host.
int getAnnouncementDelay()
PUBLIC: Returns the amount of time in milliseconds that the service will wait between the time that the Remote Service is made available and this session's existences is announced.
java.lang.String getApplicationName()
PUBLIC: Use this method to get the application name
abstract java.net.MulticastSocket getCommunicationSocket()
ADVANCED: Returns the socket that will be used for the multicast communication.
abstract java.lang.Object getDispatcher()
This is the object that will be placed in JNDI to provide remote synchronization services
java.lang.String getLocalHostURL()
This method will get the Host address of the JNDI service
abstract oracle.toplink.internal.remote.RemoteConnection getLocalRemoteConnection()
ADVANCED: This method should return a Remote Connection of the appropriate type that references the Remote dispatcher for this Session
java.lang.String getMulticastGroupAddress()
This method will return the Host adddress of the Multicast Group.
int getMulticastPort()
PUBLIC: Return the port that the Service will be using for the multicast socket
java.lang.String getSessionId()
ADVANCED: Get the Unique identifier for the session.
int getTimeToLive()
PUBLIC: Returns the number of hops the data packet will take before expiring
abstract void registerDispatcher()
ADVANCED: This method will register the dispatcher for this session in JNDI on the specified host.
void setAnnouncementDelay(int millisecondsToDelay)
PUBLIC: Sets the amount of time in millis that the service should wait between the time that the Remote Service is made available and this session's existences is announced.
void setApplicationName(java.lang.String name)
PUBLIC: Use this method to set the application name if required when deploying within an application server
void setDispatcher(java.lang.Object dispatcher)
This is the object that will be placed in JNDI to provide remote synchronization services
void setLocalHostURL(java.lang.String url)
This method will get the Host address of the JNDI service
void setMulticastGroupAddress(java.lang.String multicastGroupAddress)
This method will set the Host adddress of the Multicast Group.
void setMulticastPort(int port)
PUBLIC: Use this method to set the Multicast Port that this system will use to communicate
void setSessionId(java.lang.String sessionId)
ADVANCED: Set the Unique identifier for the session.
void setTimeToLive(int timeToLive)
PUBLIC: Use this method to set the number of hops that the Data packet will make until expiring.
void stopListening()
ADVANCED: Uses to stop the Listener thread for a dropped session

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AbstractClusteringService

public AbstractClusteringService(Session session)
PUBLIC: Creates an AbstractClusteringService

AbstractClusteringService

public AbstractClusteringService(java.lang.String multicastAddress,
                                 int multicastPort,
                                 Session session)
ADVANCED: Creates an AbstractClusteringService
Parameters:
multicastAddress - The address of the multicast group
multicastPort - The port the multicast group is listening on

Method Detail

registerDispatcher

public abstract void registerDispatcher()
ADVANCED: This method will register the dispatcher for this session in JNDI on the specified host. It must register the dispatcher under the SessionId

deregisterDispatcher

public abstract void deregisterDispatcher()
ADVANCED: This method will deregister the dispatcher for this session from JNDI on the specified host. It must deregister the dispatcher under the SessionId

createRemoteConnection

public abstract oracle.toplink.internal.remote.RemoteConnection createRemoteConnection(java.lang.String sessionId,
                                                                                       java.lang.String jndiHostURL)
ADVANCED: This method should return a remote connection of the appropraite type for use in the synchronizatio

setMulticastPort

public void setMulticastPort(int port)
PUBLIC: Use this method to set the Multicast Port that this system will use to communicate
Parameters:
port - This is the port that the multicast socket will listen on

getMulticastPort

public int getMulticastPort()
PUBLIC: Return the port that the Service will be using for the multicast socket
Returns:
the port that the multicast socket will listen on

setLocalHostURL

public void setLocalHostURL(java.lang.String url)
This method will get the Host address of the JNDI service
Parameters:
url - jndiHostURL

setTimeToLive

public void setTimeToLive(int timeToLive)
PUBLIC: Use this method to set the number of hops that the Data packet will make until expiring.
Parameters:
timeToLive -

getTimeToLive

public int getTimeToLive()
PUBLIC: Returns the number of hops the data packet will take before expiring

getCommunicationSocket

public abstract java.net.MulticastSocket getCommunicationSocket()
ADVANCED: Returns the socket that will be used for the multicast communication. By default this will be java.net.MulticastSocket

getMulticastGroupAddress

public java.lang.String getMulticastGroupAddress()
This method will return the Host adddress of the Multicast Group. Used to determine what group of servers will connect to each other for synchronization

setMulticastGroupAddress

public void setMulticastGroupAddress(java.lang.String multicastGroupAddress)
This method will set the Host adddress of the Multicast Group. Used to determine what group of servers will connect to each other for synchronization

getDispatcher

public abstract java.lang.Object getDispatcher()
                                        throws java.rmi.RemoteException
This is the object that will be placed in JNDI to provide remote synchronization services
Throws:
java.rmi.RemoteException

getLocalRemoteConnection

public abstract oracle.toplink.internal.remote.RemoteConnection getLocalRemoteConnection()
ADVANCED: This method should return a Remote Connection of the appropriate type that references the Remote dispatcher for this Session

setDispatcher

public void setDispatcher(java.lang.Object dispatcher)
This is the object that will be placed in JNDI to provide remote synchronization services
Parameters:
dispatcher -

getLocalHostURL

public java.lang.String getLocalHostURL()
This method will get the Host address of the JNDI service

setSessionId

public void setSessionId(java.lang.String sessionId)
ADVANCED: Set the Unique identifier for the session. This attribute will be used to store the service in JNDI.
Parameters:
sessionId -

getSessionId

public java.lang.String getSessionId()
ADVANCED: Get the Unique identifier for the session. This attribute will be used to store the service in JNDI.

stopListening

public void stopListening()
ADVANCED: Uses to stop the Listener thread for a dropped session

setAnnouncementDelay

public void setAnnouncementDelay(int millisecondsToDelay)
PUBLIC: Sets the amount of time in millis that the service should wait between the time that the Remote Service is made available and this session's existences is announced.

setApplicationName

public void setApplicationName(java.lang.String name)
PUBLIC: Use this method to set the application name if required when deploying within an application server

getAnnouncementDelay

public int getAnnouncementDelay()
PUBLIC: Returns the amount of time in milliseconds that the service will wait between the time that the Remote Service is made available and this session's existences is announced.

getApplicationName

public java.lang.String getApplicationName()
PUBLIC: Use this method to get the application name

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.