1 16 17 package org.springframework.remoting.caucho; 18 19 import java.net.MalformedURLException ; 20 21 import org.springframework.beans.factory.InitializingBean; 22 import org.springframework.remoting.support.UrlBasedRemoteAccessor; 23 24 33 public class CauchoRemoteAccessor extends UrlBasedRemoteAccessor implements InitializingBean { 34 35 private String username; 36 37 private String password; 38 39 private boolean overloadEnabled; 40 41 42 49 public void setUsername(String username) { 50 this.username = username; 51 } 52 53 public String getUsername() { 54 return username; 55 } 56 57 64 public void setPassword(String password) { 65 this.password = password; 66 } 67 68 public String getPassword() { 69 return password; 70 } 71 72 78 public void setOverloadEnabled(boolean overloadEnabled) { 79 this.overloadEnabled = overloadEnabled; 80 } 81 82 public boolean isOverloadEnabled() { 83 return overloadEnabled; 84 } 85 86 87 public void afterPropertiesSet() throws MalformedURLException { 88 prepare(); 89 } 90 91 100 public void prepare() throws MalformedURLException { 101 if (getServiceInterface() == null) { 102 throw new IllegalArgumentException ("serviceInterface is required"); 103 } 104 if (getServiceUrl() == null) { 105 throw new IllegalArgumentException ("serviceUrl is required"); 106 } 107 } 108 109 } 110 | Popular Tags |