|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gridsystems.innergrid.kernel.services.Connector
public class Connector
Type description.
Field Summary | |
---|---|
static java.lang.String |
HTTP
HTTP protocol identifier. |
static java.lang.String |
HTTPS
HTTPS protocol identifier. |
Constructor Summary | |
---|---|
Connector(java.lang.String name,
int port,
java.lang.String protocol)
Creates a new instance. |
Method Summary | |
---|---|
static void |
addNewProtocol(java.lang.String protocol)
Add to list of available protocols a new protocol. |
Connector |
copy()
Type-safe version of clone(). |
static Connector |
fromString(java.lang.String s)
Factory method that creates a Connector instance by parsing the specified string. |
int |
getAcceptCount()
Gets the acceptCount value. |
java.lang.String |
getAddress()
Gets the address value. |
static java.lang.String[] |
getAvailableProtocols()
Return list of available protocols. |
int |
getBufferSize()
Gets the bufferSize value. |
java.lang.String |
getClientAuth()
Gets the clientAuth value. |
java.lang.String |
getCompression()
Gets the compression value. |
int |
getConnectionLinger()
Gets the connectionLinger value. |
long |
getConnectionTimeout()
Gets the connectionTimeout value. |
int |
getMaxProcessors()
Gets the maxProcessors value. |
int |
getMinProcessors()
Gets the minProcessors value. |
java.lang.String |
getName()
Gets the name value. |
int |
getPort()
Gets the port value. |
java.lang.String |
getProtocol()
|
java.lang.String |
getScheme()
Gets the name of the protocol to have returned by calls to request.getScheme(). |
boolean |
isEnableLookups()
Gets the enableLookups value. |
boolean |
isUserCreated()
Gets the userCreated value. |
static java.util.List<Connector> |
loadFromFile(java.io.File f)
Reads a list of Connector instance from a text file, and returns it into an ArrayList instance. |
static Connector |
merge(Connector c1,
Connector c2)
Merges two instances in a new one. |
static void |
saveToFile(java.io.File f,
java.util.List list)
Saves to a text file the list of connectors. |
void |
setAcceptCount(int acceptCount)
Sets the acceptCount value. |
void |
setAddress(java.lang.String address)
Sets the address value. |
void |
setBufferSize(int bufferSize)
Sets the bufferSize value. |
void |
setClientAuth(java.lang.String clientAuth)
Sets the clientAuth value. |
void |
setCompression(java.lang.String compression)
Sets the compression value. |
void |
setConnectionLinger(int connectionLinger)
Sets the connectionLinger value. |
void |
setConnectionTimeout(long connectionTimeout)
Sets the connectionTimeout value. |
void |
setEnableLookups(boolean enableLookups)
Sets the enableLookups value. |
void |
setMaxProcessors(int maxProcessors)
Sets the maxProcessors value. |
void |
setMinProcessors(int minProcessors)
Sets the minProcessors value. |
void |
setName(java.lang.String name)
Sets the name value. |
void |
setPort(int port)
Sets the port value. |
void |
setProtocol(java.lang.String protocol)
|
void |
setUserCreated(boolean userCreated)
Sets the userCreated value. |
java.lang.String |
toString()
WARNING: SJM. |
static java.lang.String |
toXML(java.util.List conns,
java.lang.String keystore,
java.lang.String password,
java.lang.String trustStore,
java.lang.String trustPaswd)
Converts a list of connectors into an XML string. |
java.lang.String |
toXML(java.lang.String keystore,
java.lang.String password,
java.lang.String truststore,
java.lang.String trustpass)
Gets an XML fragment for insertion into a Tomcat server.xml file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HTTP
public static final java.lang.String HTTPS
Constructor Detail |
---|
public Connector(java.lang.String name, int port, java.lang.String protocol)
name
- the connector display nameport
- the connector portprotocol
- The protocol.Method Detail |
---|
public int getAcceptCount()
public void setAcceptCount(int acceptCount)
acceptCount
- The acceptCount to setpublic java.lang.String getAddress()
public void setAddress(java.lang.String address)
address
- The address to setpublic int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize
- The bufferSize to setpublic java.lang.String getClientAuth()
public void setClientAuth(java.lang.String clientAuth)
clientAuth
- The attribute value. Valid values are (false, true, want)public java.lang.String getCompression()
public void setCompression(java.lang.String compression)
compression
- The compression to setpublic int getConnectionLinger()
public void setConnectionLinger(int connectionLinger)
connectionLinger
- The connectionLinger to setpublic long getConnectionTimeout()
public void setConnectionTimeout(long connectionTimeout)
connectionTimeout
- The connectionTimeout to setpublic boolean isEnableLookups()
public void setEnableLookups(boolean enableLookups)
enableLookups
- The enableLookups to setpublic int getMaxProcessors()
public void setMaxProcessors(int maxProcessors)
maxProcessors
- The maxProcessors to setpublic int getMinProcessors()
public void setMinProcessors(int minProcessors)
minProcessors
- The minProcessors to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to setpublic int getPort()
public void setPort(int port)
port
- The port to setpublic boolean isUserCreated()
public void setUserCreated(boolean userCreated)
userCreated
- The userCreated to setpublic java.lang.String getScheme()
It can be "http" or "https", depending on the secure
flag value.
public java.lang.String toString()
toString
in class java.lang.Object
public Connector copy()
public java.lang.String toXML(java.lang.String keystore, java.lang.String password, java.lang.String truststore, java.lang.String trustpass)
keystore
- the path to the keystore (for SSL connectors)password
- the keystore password (for SSL connectors)truststore
- the path to the truststore (optional, for SSL connectors)trustpass
- the truststore password (optional, for SSL connectors)
public static java.lang.String toXML(java.util.List conns, java.lang.String keystore, java.lang.String password, java.lang.String trustStore, java.lang.String trustPaswd)
conns
- the list of connectorskeystore
- the keystore pathpassword
- the keystore passwordtrustStore
- the trust storetrustPaswd
- the trust store password
public static Connector merge(Connector c1, Connector c2)
The created instance will have its attributes set to appropriate values for serving both Connectors.
c1
- The first connectorc2
- The second connector
public static Connector fromString(java.lang.String s) throws java.text.ParseException
s
- the string to parse
java.text.ParseException
- if a syntax error is detectedpublic static java.util.List<Connector> loadFromFile(java.io.File f) throws java.io.IOException, java.text.ParseException
f
- the file to read from
java.io.IOException
- If a read error occurs
java.text.ParseException
- If a syntax error occurspublic static void saveToFile(java.io.File f, java.util.List list) throws java.io.IOException
f
- the destination filelist
- the list of connectors
java.io.IOException
- If a write error occurs
java.lang.ClassCastException
- If an element of the list is not a Connector instancepublic java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
protocol
- The protocol to set.public static void addNewProtocol(java.lang.String protocol)
protocol
- New protocol to add.public static java.lang.String[] getAvailableProtocols()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |