Package org.apache.axis.components.net
Class DefaultSocketFactory
- java.lang.Object
-
- org.apache.axis.components.net.DefaultSocketFactory
-
- All Implemented Interfaces:
SocketFactory
- Direct Known Subclasses:
JSSESocketFactory
public class DefaultSocketFactory extends java.lang.Object implements SocketFactory
Default socket factory.- Author:
- Davanum Srinivas (dims@yahoo.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Hashtableattributesattributesstatic java.lang.StringCONNECT_TIMEOUTField CONNECT_TIMEOUTprotected static org.apache.commons.logging.LoglogField log
-
Constructor Summary
Constructors Constructor Description DefaultSocketFactory(java.util.Hashtable attributes)Constructor is used only by subclasses.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.Socketcreate(java.lang.String host, int port, java.lang.StringBuffer otherHeaders, BooleanHolder useFullURL)Creates a socket.protected booleanisHostInNonProxyList(java.lang.String host, java.lang.String nonProxyHosts)Check if the specified host is in the list of non proxy hosts.protected static booleanmatch(java.lang.String pattern, java.lang.String str, boolean isCaseSensitive)Matches a string against a pattern.
-
-
-
Method Detail
-
create
public java.net.Socket create(java.lang.String host, int port, java.lang.StringBuffer otherHeaders, BooleanHolder useFullURL) throws java.lang.ExceptionCreates a socket.- Specified by:
createin interfaceSocketFactory- Parameters:
host-port-otherHeaders-useFullURL-- Returns:
- Socket
- Throws:
java.lang.Exception
-
isHostInNonProxyList
protected boolean isHostInNonProxyList(java.lang.String host, java.lang.String nonProxyHosts)Check if the specified host is in the list of non proxy hosts.- Parameters:
host- host namenonProxyHosts- string containing the list of non proxy hosts- Returns:
- true/false
-
match
protected static boolean match(java.lang.String pattern, java.lang.String str, boolean isCaseSensitive)Matches a string against a pattern. The pattern contains two special characters: '*' which means zero or more characters,- Parameters:
pattern- the (non-null) pattern to match againststr- the (non-null) string that must be matched against the patternisCaseSensitive-- Returns:
truewhen the string matches against the pattern,falseotherwise.
-
-