net.sf.ehcache.distribution

Class JNDIRMICacheManagerPeerListener

public class JNDIRMICacheManagerPeerListener extends RMICacheManagerPeerListener implements CacheManagerPeerListener

A cache server which exposes available cache operations remotely through RMI. Uses JNDI to bind the remote cache.

Version: $Id: JNDIRMICacheManagerPeerListener.java 170 2006-08-11 11:25:58Z gregluck $

Author: Andy McNutt Greg Luck

See Also: RMICacheManagerPeerListener

Constructor Summary
JNDIRMICacheManagerPeerListener(String hostName, Integer port, CacheManager cacheManager, Integer socketTimeoutMillis)
Constructor with full arguments.
Method Summary
protected voiddisposeRMICachePeer(RMICachePeer rmiCachePeer)
Disposes an individual RMICachePeer.
voidinit()

Constructor Detail

JNDIRMICacheManagerPeerListener

public JNDIRMICacheManagerPeerListener(String hostName, Integer port, CacheManager cacheManager, Integer socketTimeoutMillis)
Constructor with full arguments.

Parameters: hostName may be null, in which case the hostName will be looked up. Machines with multiple interfaces should specify this if they do not want it to be the default NIC. port a port in the range 1025 - 65536 cacheManager the CacheManager this listener belongs to socketTimeoutMillis TCP/IP Socket timeout when waiting on response Constructor

Throws: java.net.UnknownHostException

See Also: RMICacheManagerPeerListener

Method Detail

disposeRMICachePeer

protected void disposeRMICachePeer(RMICachePeer rmiCachePeer)
Disposes an individual RMICachePeer. This consists of:
  1. Unbinding the peer from the naming service
  2. Unexporting the peer

Parameters: rmiCachePeer the cache peer to dispose of

Throws: Exception thrown if something goes wrong

init

public void init()
{@inheritDoc }