org.apache.jcs.auxiliary.remote
Class RemoteCacheClientTester

java.lang.Object
  extended by org.apache.jcs.auxiliary.remote.RemoteCacheClientTester
All Implemented Interfaces:
Remote, IRemoteCacheConstants, IRemoteCacheListener<String,String>, ICacheListener<String,String>

public class RemoteCacheClientTester
extends Object
implements IRemoteCacheListener<String,String>, IRemoteCacheConstants, Remote

Manual tester.


Field Summary
protected  ICacheService<String,String> cache
          the service
protected static long listenerId
          Description of the Field
protected  ICacheObserver watch
          the observer
 
Fields inherited from interface org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener
CLIENT_LISTENER, SERVER_LISTENER
 
Fields inherited from interface org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheConstants
CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX, CACHE_SERVER_PREFIX, CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX, PROPERTY_PREFIX, REMOTE_ALLOW_CLUSTER_GET, REMOTE_CACHE_SERVICE_NAME, REMOTE_CACHE_SERVICE_PORT, REMOTE_CACHE_SERVICE_VAL, REMOTE_LOCAL_CLUSTER_CONSISTENCY, SOCKET_TIMEOUT_MILLIS, TOMCAT_ON, TOMCAT_XML
 
Constructor Summary
RemoteCacheClientTester(int count)
          Constructor for the RemoteCacheClientTest object
RemoteCacheClientTester(int count, boolean write, boolean read, boolean delete)
          Constructor for the RemoteCacheClientTest object
RemoteCacheClientTester(String host, int port, int count, boolean write, boolean read, boolean delete)
          Constructor for the RemoteCacheClientTest object
 
Method Summary
 void dispose()
           
 long getListenerId()
          Gets the listenerId attribute of the RemoteCacheClientTest object
 String getLocalHostAddress()
           
 RemoteType getRemoteType()
          Gets the remoteType attribute of the RemoteCacheClientTest object
 void handleDispose(String cacheName)
           
 void handlePut(ICacheElement<String,String> cb)
           
 void handleRemove(String cacheName, String key)
           
 void handleRemoveAll(String cacheName)
           
static void main(String[] args)
          The main program for the RemoteCacheClientTest class
 void setListenerId(long id)
          Sets the listenerId attribute of the RemoteCacheClientTest object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

watch

protected ICacheObserver watch
the observer


cache

protected ICacheService<String,String> cache
the service


listenerId

protected static long listenerId
Description of the Field

Constructor Detail

RemoteCacheClientTester

public RemoteCacheClientTester(int count)
                        throws MalformedURLException,
                               NotBoundException,
                               IOException
Constructor for the RemoteCacheClientTest object

Parameters:
count -
Throws:
MalformedURLException
NotBoundException
IOException

RemoteCacheClientTester

public RemoteCacheClientTester(int count,
                               boolean write,
                               boolean read,
                               boolean delete)
                        throws MalformedURLException,
                               NotBoundException,
                               IOException
Constructor for the RemoteCacheClientTest object

Parameters:
count -
write -
read -
delete -
Throws:
MalformedURLException
NotBoundException
IOException

RemoteCacheClientTester

public RemoteCacheClientTester(String host,
                               int port,
                               int count,
                               boolean write,
                               boolean read,
                               boolean delete)
                        throws MalformedURLException,
                               NotBoundException,
                               IOException
Constructor for the RemoteCacheClientTest object

Parameters:
host -
port -
count -
write -
read -
delete -
Throws:
MalformedURLException
NotBoundException
IOException
Method Detail

getRemoteType

public RemoteType getRemoteType()
                         throws IOException
Gets the remoteType attribute of the RemoteCacheClientTest object

Specified by:
getRemoteType in interface IRemoteCacheListener<String,String>
Returns:
The remoteType value
Throws:
IOException

handlePut

public void handlePut(ICacheElement<String,String> cb)
               throws IOException
Specified by:
handlePut in interface ICacheListener<String,String>
Parameters:
cb -
Throws:
IOException

handleRemove

public void handleRemove(String cacheName,
                         String key)
                  throws IOException
Specified by:
handleRemove in interface ICacheListener<String,String>
Parameters:
cacheName -
key -
Throws:
IOException

handleRemoveAll

public void handleRemoveAll(String cacheName)
                     throws IOException
Specified by:
handleRemoveAll in interface ICacheListener<String,String>
Parameters:
cacheName -
Throws:
IOException

handleDispose

public void handleDispose(String cacheName)
                   throws IOException
Specified by:
handleDispose in interface ICacheListener<String,String>
Parameters:
cacheName -
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
The main program for the RemoteCacheClientTest class

Parameters:
args - The command line arguments
Throws:
Exception

setListenerId

public void setListenerId(long id)
                   throws IOException
Sets the listenerId attribute of the RemoteCacheClientTest object

Specified by:
setListenerId in interface IRemoteCacheListener<String,String>
Specified by:
setListenerId in interface ICacheListener<String,String>
Parameters:
id - The new listenerId value
Throws:
IOException

getListenerId

public long getListenerId()
                   throws IOException
Gets the listenerId attribute of the RemoteCacheClientTest object

Specified by:
getListenerId in interface IRemoteCacheListener<String,String>
Specified by:
getListenerId in interface ICacheListener<String,String>
Returns:
The listenerId value
Throws:
IOException

getLocalHostAddress

public String getLocalHostAddress()
                           throws IOException
Specified by:
getLocalHostAddress in interface IRemoteCacheListener<String,String>
Returns:
null
Throws:
IOException

dispose

public void dispose()
             throws IOException
Specified by:
dispose in interface IRemoteCacheListener<String,String>
Throws:
IOException


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.