1 28 package org.objectweb.carol.rmi.jrmp.interceptor; 29 30 import java.util.ArrayList ; 32 import java.util.Iterator ; 33 34 41 public class JRMPInitInfoImpl implements JInitInfo { 42 43 46 protected ArrayList serverInterceptors = new ArrayList (); 47 48 51 protected ArrayList clientInterceptors = new ArrayList (); 52 53 57 public void add_client_request_interceptor(JClientRequestInterceptor interceptor) { 58 clientInterceptors.add(interceptor); 59 } 60 61 65 public void add_server_request_interceptor(JServerRequestInterceptor interceptor) { 66 serverInterceptors.add(interceptor); 67 } 68 69 73 public JClientRequestInterceptor[] getClientRequestInterceptors() { 74 JClientRequestInterceptor[] result = new JClientRequestInterceptor[clientInterceptors.size()]; 75 int j = 0; 76 for (Iterator i = clientInterceptors.iterator(); i.hasNext();) { 77 result[j] = (JClientRequestInterceptor) i.next(); 78 j++; 79 } 80 return result; 81 } 82 83 87 public JServerRequestInterceptor[] getServerRequestInterceptors() { 88 JServerRequestInterceptor[] result = new JServerRequestInterceptor[serverInterceptors.size()]; 89 int j = 0; 90 for (Iterator i = serverInterceptors.iterator(); i.hasNext();) { 91 result[j] = (JServerRequestInterceptor) i.next(); 92 j++; 93 } 94 return result; 95 } 96 97 public void clear() { 98 serverInterceptors.clear(); 99 clientInterceptors.clear(); 100 } 101 } | Popular Tags |