Lines 64-69
Link Here
|
64 |
|
64 |
|
65 |
protected static final StringManager sm = StringManager.getManager(AbstractEndpoint.class); |
65 |
protected static final StringManager sm = StringManager.getManager(AbstractEndpoint.class); |
66 |
|
66 |
|
|
|
67 |
private static final String SOCKET_PROPERTY_PREFIX = "socket."; |
68 |
|
67 |
public static interface Handler<S> { |
69 |
public static interface Handler<S> { |
68 |
|
70 |
|
69 |
/** |
71 |
/** |
Lines 741-750
Link Here
|
741 |
|
743 |
|
742 |
public boolean setProperty(String name, String value) { |
744 |
public boolean setProperty(String name, String value) { |
743 |
setAttribute(name, value); |
745 |
setAttribute(name, value); |
744 |
final String socketName = "socket."; |
|
|
745 |
try { |
746 |
try { |
746 |
if (name.startsWith(socketName)) { |
747 |
if (name.startsWith(SOCKET_PROPERTY_PREFIX)) { |
747 |
return IntrospectionUtils.setProperty(socketProperties, name.substring(socketName.length()), value); |
748 |
return IntrospectionUtils.setProperty( |
|
|
749 |
socketProperties, name.substring(SOCKET_PROPERTY_PREFIX.length()), value); |
748 |
} else { |
750 |
} else { |
749 |
return IntrospectionUtils.setProperty(this,name,value,false); |
751 |
return IntrospectionUtils.setProperty(this,name,value,false); |
750 |
} |
752 |
} |
Lines 755-763
Link Here
|
755 |
} |
757 |
} |
756 |
public String getProperty(String name) { |
758 |
public String getProperty(String name) { |
757 |
String value = (String) getAttribute(name); |
759 |
String value = (String) getAttribute(name); |
758 |
final String socketName = "socket."; |
760 |
if (value == null) { |
759 |
if (value == null && name.startsWith(socketName)) { |
761 |
Object result; |
760 |
Object result = IntrospectionUtils.getProperty(socketProperties, name.substring(socketName.length())); |
762 |
if (name.startsWith(SOCKET_PROPERTY_PREFIX)) { |
|
|
763 |
result = IntrospectionUtils.getProperty( |
764 |
socketProperties, name.substring(SOCKET_PROPERTY_PREFIX.length())); |
765 |
} else { |
766 |
result = IntrospectionUtils.getProperty(this, name); |
767 |
} |
761 |
if (result != null) { |
768 |
if (result != null) { |
762 |
value = result.toString(); |
769 |
value = result.toString(); |
763 |
} |
770 |
} |
Lines 1208-1213
Link Here
|
1208 |
|
1215 |
|
1209 |
protected abstract U serverSocketAccept() throws Exception; |
1216 |
protected abstract U serverSocketAccept() throws Exception; |
1210 |
|
1217 |
|
|
|
1218 |
public abstract void closeServerSocket() throws IOException; |
1219 |
|
1211 |
protected abstract boolean setSocketOptions(U socket); |
1220 |
protected abstract boolean setSocketOptions(U socket); |
1212 |
|
1221 |
|
1213 |
protected abstract void closeSocket(U socket); |
1222 |
protected abstract void closeSocket(U socket); |