* @param BuildException Thrown if an error occurs during execution of
* this task.
*/
+ @Override
public void execute()
throws BuildException
{
/** Overriden - will do nothing but reset internal state.
*/
+ @Override
public final void close() throws IOException {
// NOTHING
// Calling super.close() would reset out and cb.
}
+ @Override
public final int read(char cbuf[], int off, int len)
throws IOException
{
public IntermediateInputStream() {
}
+ @Override
public final void close() throws IOException {
// shouldn't be called - we filter it out in writer
throw new IOException("close() called - shouldn't happen ");
}
+ @Override
public final int read(byte cbuf[], int off, int len) throws IOException {
return bc.substract(cbuf, off, len);
}
+ @Override
public final int read() throws IOException {
return bc.substract();
}
// -------------------- Conversion and getters --------------------
+ @Override
public String toString() {
if (null == buff) {
return null;
/** Overriden - will do nothing but reset internal state.
*/
+ @Override
public final void close() throws IOException {
// NOTHING
// Calling super.close() would reset out and cb.
/**
* Flush the characters only
*/
+ @Override
public final void flush() throws IOException {
// Will flushBuffer and out()
// flushBuffer put any remaining chars in the byte[]
super.flush();
}
+ @Override
public final void write(char cbuf[], int off, int len) throws IOException {
// will do the conversion and call write on the output stream
super.write( cbuf, off, len );
this.tbuff=tbuff;
}
+ @Override
public final void close() throws IOException {
// shouldn't be called - we filter it out in writer
throw new IOException("close() called - shouldn't happen ");
}
+ @Override
public final void flush() throws IOException {
// nothing - write will go directly to the buffer,
// we don't keep any state
}
+ @Override
public final void write(byte cbuf[], int off, int len) throws IOException {
// will do the conversion and call write on the output stream
if( enabled ) {
}
}
+ @Override
public final void write( int i ) throws IOException {
throw new IOException("write( int ) called - shouldn't happen ");
}
// -------------------- Conversion and getters --------------------
+ @Override
public String toString() {
if (null == buff) {
return null;
/** Compute the string value
*/
+ @Override
public String toString() {
if( hasStrValue ) return strValue;
// -------------------- Hash code --------------------
+ @Override
public int hashCode() {
if( hasHashCode ) return hashCode;
int code = 0;
public String enc = null;
public String value = null;
+ @Override
public String toString() {
return value;
}
+ @Override
public int hashCode() {
return value.hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof ByteEntry) {
return value.equals(((ByteEntry) obj).value);
public char[] name = null;
public String value = null;
+ @Override
public String toString() {
return value;
}
+ @Override
public int hashCode() {
return value.hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof CharEntry) {
return value.equals(((CharEntry) obj).value);
* Set the associated digester.
* If needed, this class loads the parameter classes from their names.
*/
+ @Override
public void setDigester(Digester digester)
{
// call superclass
* the element name otherwise
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
* the element name otherwise
* @param bodyText The body text of this element
*/
+ @Override
public void body(String namespace, String name, String bodyText)
throws Exception {
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
// Retrieve or construct the parameter values array
/**
* Clean up after parsing is complete.
*/
+ @Override
public void finish() throws Exception {
bodyText = null;
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("CallMethodRule[");
* the element name otherwise
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
* the element name otherwise
* @param bodyText The body text of this element
*/
+ @Override
public void body(String namespace, String name, String bodyText)
throws Exception {
/**
* Process any body texts now.
*/
+ @Override
public void end(String namespace, String name) {
if (bodyTextStack != null && !bodyTextStack.empty()) {
// what we do now is push one parameter onto the top set of parameters
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("CallParamRule[");
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void characters(char buffer[], int start, int length)
throws SAXException {
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void endDocument() throws SAXException {
if (saxLog.isDebugEnabled()) {
* empty string if qualified names are not available.
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void endElement(String namespaceURI, String localName,
String qName) throws SAXException {
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void endPrefixMapping(String prefix) throws SAXException {
if (saxLog.isDebugEnabled()) {
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void ignorableWhitespace(char buffer[], int start, int len)
throws SAXException {
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void processingInstruction(String target, String data)
throws SAXException {
*
* @param locator The new locator
*/
+ @Override
public void setDocumentLocator(Locator locator) {
if (saxLog.isDebugEnabled()) {
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void skippedEntity(String name) throws SAXException {
if (saxLog.isDebugEnabled()) {
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void startDocument() throws SAXException {
if (saxLog.isDebugEnabled()) {
* no attributes, it shall be an empty Attributes object.
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void startElement(String namespaceURI, String localName,
String qName, Attributes list)
throws SAXException {
*
* @exception SAXException if a parsing error is to be reported
*/
+ @Override
public void startPrefixMapping(String prefix, String namespaceURI)
throws SAXException {
* @param publicId The public identifier (if any)
* @param systemId The system identifier (if any)
*/
+ @Override
public void notationDecl(String name, String publicId, String systemId) {
if (saxLog.isDebugEnabled()) {
* @param systemId The system identifier (if any)
* @param notation The name of the associated notation
*/
+ @Override
public void unparsedEntityDecl(String name, String publicId,
String systemId, String notation) {
* @exception SAXException if a parsing exception occurs
*
*/
+ @Override
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException {
*
* @exception SAXException if a parsing exception occurs
*/
+ @Override
public void error(SAXParseException exception) throws SAXException {
log.error("Parse Error at line " + exception.getLineNumber() +
*
* @exception SAXException if a parsing exception occurs
*/
+ @Override
public void fatalError(SAXParseException exception) throws SAXException {
log.error("Parse Fatal Error at line " + exception.getLineNumber() +
*
* @exception SAXException if a parsing exception occurs
*/
+ @Override
public void warning(SAXParseException exception) throws SAXException {
if (errorHandler != null) {
log.warn("Parse Warning Error at line " + exception.getLineNumber() +
*
* @param attributes The attribute list of this element
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes) throws Exception {
if (ignoreCreateExceptions) {
/**
* Process the end of this element.
*/
+ @Override
public void end(String namespace, String name) throws Exception {
// check if object was created
/**
* Clean up after parsing is complete.
*/
+ @Override
public void finish() throws Exception {
if (attributeName != null) {
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("FactoryCreateRule[");
* @param length the number of characters to read from the array
* @throws SAXException if the DOM implementation throws an exception
*/
+ @Override
public void characters(char[] ch, int start, int length)
throws SAXException {
* @param qName the qualified (prefixed) name
* @throws SAXException if the DOM implementation throws an exception
*/
+ @Override
public void endElement(String namespaceURI, String localName,
String qName)
throws SAXException {
* supplied
* @throws SAXException if the DOM implementation throws an exception
*/
+ @Override
public void processingInstruction(String target, String data)
throws SAXException {
* @param atts the list of attributes
* @throws SAXException if the DOM implementation throws an exception
*/
+ @Override
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts)
throws SAXException {
* @param attributes The attribute list of this element
* @throws Exception indicates a JAXP configuration problem
*/
+ @Override
public void begin(String namespaceURI, String name, Attributes attributes)
throws Exception {
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
digester.pop();
* the element name otherwise
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
Object top = digester.pop();
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ObjectCreateRule[");
*
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String name,
Attributes attributes) throws Exception {
Object anAttribute = null;
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ObjectParamRule[");
sb.append("paramIndex=");
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes) throws Exception {
String param = getDigester().getMatch();
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("PathCallParamRule[");
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SetNextRule[");
* the element name otherwise
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String theName, Attributes attributes)
throws Exception {
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SetPropertiesRule[");
* @exception NoSuchMethodException if the bean does not
* have a writeable property of the specified name
*/
+ @Override
public void begin(String namespace, String theName, Attributes attributes)
throws Exception {
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SetPropertyRule[");
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SetRootRule[");
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SetTopRule[");
/**
* EXPENSIVE!!! only for debugging.
*/
+ @Override
public String toString() {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
/**
* EXPENSIVE!!! only for debugging.
*/
+ @Override
public String toString() {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
}
}
+ @Override
public void recycle() {
super.recycle();
paramHashStringArray.clear();
"EEE, dd-MMM-yyyy HH:mm:ss z";
private static final ThreadLocal<DateFormat> OLD_COOKIE_FORMAT =
new ThreadLocal<DateFormat>() {
+ @Override
protected DateFormat initialValue() {
DateFormat df =
new SimpleDateFormat(OLD_COOKIE_PATTERN, Locale.US);
// -------------------- utils --------------------
+ @Override
public String toString() {
return "Cookie " + getName() + "=" + getValue() + " ; "
+ getVersion() + " " + getPath() + " " + getDomain();
/**
* Removes the file contents from the temporary storage.
*/
+ @Override
protected void finalize()
{
File outputFile = dfos.getFile();
*
* @exception IOException if an error occurs.
*/
+ @Override
protected OutputStream getStream() throws IOException
{
return currentOutputStream;
*
* @exception IOException if an error occurs.
*/
+ @Override
protected void thresholdReached() throws IOException
{
byte[] data = memoryOutputStream.toByteArray();
*
* @return The factory class for new file items.
*/
+ @Override
public FileItemFactory getFileItemFactory()
{
return fileItemFactory;
*
* @param factory The factory class for new file items.
*/
+ @Override
public void setFileItemFactory(FileItemFactory factory)
{
this.fileItemFactory = (DefaultFileItemFactory) factory;
*
* @return The factory class for new file items.
*/
+ @Override
public FileItemFactory getFileItemFactory()
{
return fileItemFactory;
*
* @param factory The factory class for new file items.
*/
+ @Override
public void setFileItemFactory(FileItemFactory factory)
{
this.fileItemFactory = factory;
*
* @return The string representation of this object.
*/
+ @Override
public String toString()
{
StringBuilder sbTemp = new StringBuilder();
*
* @exception IOException if an error occurs.
*/
+ @Override
public void write(int b) throws IOException
{
checkThreshold(1);
*
* @exception IOException if an error occurs.
*/
+ @Override
public void write(byte b[]) throws IOException
{
checkThreshold(b.length);
*
* @exception IOException if an error occurs.
*/
+ @Override
public void write(byte b[], int off, int len) throws IOException
{
checkThreshold(len);
*
* @exception IOException if an error occurs.
*/
+ @Override
public void flush() throws IOException
{
getStream().flush();
*
* @exception IOException if an error occurs.
*/
+ @Override
public void close() throws IOException
{
try
// ---------------------------------------------------- PrintStream Methods
+ @Override
public void flush() {
findStream().flush();
}
+ @Override
public void close() {
findStream().close();
}
+ @Override
public boolean checkError() {
return findStream().checkError();
}
+ @Override
protected void setError() {
//findStream().setError();
}
+ @Override
public void write(int b) {
findStream().write(b);
}
+ @Override
public void write(byte[] b)
throws IOException {
findStream().write(b);
}
+ @Override
public void write(byte[] buf, int off, int len) {
findStream().write(buf, off, len);
}
+ @Override
public void print(boolean b) {
findStream().print(b);
}
+ @Override
public void print(char c) {
findStream().print(c);
}
+ @Override
public void print(int i) {
findStream().print(i);
}
+ @Override
public void print(long l) {
findStream().print(l);
}
+ @Override
public void print(float f) {
findStream().print(f);
}
+ @Override
public void print(double d) {
findStream().print(d);
}
+ @Override
public void print(char[] s) {
findStream().print(s);
}
+ @Override
public void print(String s) {
findStream().print(s);
}
+ @Override
public void print(Object obj) {
findStream().print(obj);
}
+ @Override
public void println() {
findStream().println();
}
+ @Override
public void println(boolean x) {
findStream().println(x);
}
+ @Override
public void println(char x) {
findStream().println(x);
}
+ @Override
public void println(int x) {
findStream().println(x);
}
+ @Override
public void println(long x) {
findStream().println(x);
}
+ @Override
public void println(float x) {
findStream().println(x);
}
+ @Override
public void println(double x) {
findStream().println(x);
}
+ @Override
public void println(char[] x) {
findStream().println(x);
}
+ @Override
public void println(String x) {
findStream().println(x);
}
+ @Override
public void println(Object x) {
findStream().println(x);
}
// }
}
+ @Override
public String toString() {
if( resource==null )
return "BaseModelMbean[" + resourceType + "]";
this.signature = signature;
}
- public boolean equals(Object other) {
+ @Override
+ public boolean equals(Object other) {
if(!(other instanceof MethodKey)) {
return false;
}
return true;
}
- public int hashCode() {
+ @Override
+ public int hashCode() {
return name.hashCode();
}
}
/**
* Return a string representation of this managed bean.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ManagedBean[");
*
* @param description The new description
*/
+ @Override
public void setDescription(String description) {
super.setDescription(description);
this.info = null;
*
* @param name The new name
*/
+ @Override
public void setName(String name) {
super.setName(name);
this.info = null;
/**
* Return a string representation of this notification descriptor.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("NotificationInfo[");
this.source=source;
}
+ @Override
public List<ObjectName> loadDescriptors( Registry registry, String location,
String type, Object source)
throws Exception
this.source=source;
}
+ @Override
public List<ObjectName> loadDescriptors( Registry registry, String location,
String type, Object source) throws Exception {
setRegistry(registry);
this.source=source;
}
+ @Override
public List<ObjectName> loadDescriptors( Registry registry, String location,
String type, Object source) throws Exception {
setRegistry(registry);
this.source=source;
}
+ @Override
public List<ObjectName> loadDescriptors( Registry registry, String location,
String type, Object source) throws Exception {
setRegistry(registry);
return mbeans;
}
+ @Override
public List<ObjectName> loadDescriptors(Registry registry, String location,
String type, Object source) throws Exception {
setRegistry(registry);
}
}
+ @Override
public void updateField( ObjectName oname, String name,
Object value )
{
* Priority of the acceptor and poller threads.
*/
protected int threadPriority = Thread.NORM_PRIORITY;
+ @Override
public void setThreadPriority(int threadPriority) { this.threadPriority = threadPriority; }
+ @Override
public int getThreadPriority() { return threadPriority; }
/* NOTHING */
}
+ @Override
public ServerSocket createSocket (int port)
throws IOException {
return new ServerSocket (port);
}
+ @Override
public ServerSocket createSocket (int port, int backlog)
throws IOException {
return new ServerSocket (port, backlog);
}
+ @Override
public ServerSocket createSocket (int port, int backlog,
InetAddress ifAddress)
throws IOException {
return new ServerSocket (port, backlog, ifAddress);
}
+ @Override
public Socket acceptSocket(ServerSocket socket)
throws IOException {
return socket.accept();
}
+ @Override
public void handshake(Socket sock)
throws IOException {
// NOOP
/**
* Generic properties - currently only socket.XXX properties
*/
+ @Override
public boolean setProperty(String name, String value) {
final String socketName = "socket.";
try {
* Priority of the acceptor and poller threads.
*/
protected int threadPriority = Thread.NORM_PRIORITY;
+ @Override
public void setThreadPriority(int threadPriority) { this.threadPriority = threadPriority; }
+ @Override
public int getThreadPriority() { return threadPriority; }
this.sc = IOChannel;
}
+ @Override
public String toString() {
return super.toString()+":"+this.sc.toString();
}
*/
protected ConcurrentLinkedQueue<SocketProcessor> processorCache = new ConcurrentLinkedQueue<SocketProcessor>() {
protected AtomicInteger size = new AtomicInteger(0);
+ @Override
public boolean offer(SocketProcessor sc) {
sc.reset(null,null);
boolean offer = socketProperties.getProcessorCache()==-1?true:size.get()<socketProperties.getProcessorCache();
else return false;
}
+ @Override
public SocketProcessor poll() {
SocketProcessor result = super.poll();
if ( result != null ) {
return result;
}
+ @Override
public void clear() {
super.clear();
size.set(0);
*/
protected ConcurrentLinkedQueue<KeyAttachment> keyCache = new ConcurrentLinkedQueue<KeyAttachment>() {
protected AtomicInteger size = new AtomicInteger(0);
+ @Override
public boolean offer(KeyAttachment ka) {
ka.reset();
boolean offer = socketProperties.getKeyCache()==-1?true:size.get()<socketProperties.getKeyCache();
else return false;
}
+ @Override
public KeyAttachment poll() {
KeyAttachment result = super.poll();
if ( result != null ) {
return result;
}
+ @Override
public void clear() {
super.clear();
size.set(0);
*/
protected ConcurrentLinkedQueue<PollerEvent> eventCache = new ConcurrentLinkedQueue<PollerEvent>() {
protected AtomicInteger size = new AtomicInteger(0);
+ @Override
public boolean offer(PollerEvent pe) {
pe.reset();
boolean offer = socketProperties.getEventCache()==-1?true:size.get()<socketProperties.getEventCache();
else return false;
}
+ @Override
public PollerEvent poll() {
PollerEvent result = super.poll();
if ( result != null ) {
return result;
}
+ @Override
public void clear() {
super.clear();
size.set(0);
protected ConcurrentLinkedQueue<NioChannel> nioChannels = new ConcurrentLinkedQueue<NioChannel>() {
protected AtomicInteger size = new AtomicInteger(0);
protected AtomicInteger bytes = new AtomicInteger(0);
+ @Override
public boolean offer(NioChannel socket) {
boolean offer = socketProperties.getBufferPool()==-1?true:size.get()<socketProperties.getBufferPool();
offer = offer && (socketProperties.getBufferPoolSize()==-1?true:(bytes.get()+socket.getBufferSize())<socketProperties.getBufferPoolSize());
else return false;
}
+ @Override
public NioChannel poll() {
NioChannel result = super.poll();
if ( result != null ) {
return result;
}
+ @Override
public void clear() {
super.clear();
size.set(0);
* SSL engine.
*/
protected boolean SSLEnabled = false;
+ @Override
public boolean isSSLEnabled() { return SSLEnabled;}
+ @Override
public void setSSLEnabled(boolean SSLEnabled) {this.SSLEnabled = SSLEnabled;}
protected boolean secure = false;
*
* @return true if the endpoint is running, false otherwise
*/
+ @Override
public boolean isRunning() {
return running;
}
*
* @return true if the endpoint is paused, false otherwise
*/
+ @Override
public boolean isPaused() {
return paused;
}
}//end if
}//run
+ @Override
public String toString() {
return super.toString()+"[intOps="+this.interestOps+"]";
}
this.sslEngine = engine;
reset();
}
+ @Override
public void reset() throws IOException {
super.reset();
netOutBuffer.position(0);
initHandshakeStatus = sslEngine.getHandshakeStatus();
}
+ @Override
public int getBufferSize() {
int size = super.getBufferSize();
size += netInBuffer!=null?netInBuffer.capacity():0;
* been flushed out and is empty
* @return boolean
*/
+ @Override
public boolean flush(boolean block, Selector s, long timeout,MutableInteger lastWrite) throws IOException {
if (!block) {
flush(netOutBuffer);
* @return int - 0 if hand shake is complete, otherwise it returns a SelectionKey interestOps value
* @throws IOException
*/
+ @Override
public int handshake(boolean read, boolean write) throws IOException {
if ( initHandshakeComplete ) return 0; //we have done our initial handshake
* @throws IOException if there is data on the outgoing network buffer and we are unable to flush it
* @todo Implement this java.io.Closeable method
*/
+ @Override
public void close() throws IOException {
if (closing) return;
closing = true;
* @param force boolean
* @throws IOException
*/
+ @Override
public void close(boolean force) throws IOException {
try {
close();
* @throws IllegalArgumentException if the destination buffer is different than bufHandler.getReadBuffer()
* @todo Implement this java.nio.channels.ReadableByteChannel method
*/
+ @Override
public int read(ByteBuffer dst) throws IOException {
//if we want to take advantage of the expand function, make sure we only use the ApplicationBufferHandler's buffers
if ( dst != bufHandler.getReadBuffer() ) throw new IllegalArgumentException("You can only read using the application read buffer provided by the handler.");
* @throws IOException If some other I/O error occurs
* @todo Implement this java.nio.channels.WritableByteChannel method
*/
+ @Override
public int write(ByteBuffer src) throws IOException {
if ( src == this.netOutBuffer ) {
//we can get here through a recursive call
public ByteBuffer getWriteBuffer();
}
+ @Override
public ApplicationBufferHandler getBufHandler() {
return bufHandler;
}
+ @Override
public boolean isInitHandshakeComplete() {
return initHandshakeComplete;
}
+ @Override
public boolean isClosing() {
return closing;
}
this.bufHandler = bufHandler;
}
+ @Override
public SocketChannel getIOChannel() {
return sc;
}
*
* @param obj The URL to compare against
*/
+ @Override
public boolean equals(Object obj) {
if (obj == null)
/**
* Return a string representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("URL[");
}
+ @Override
public String getImplementationName(){
return "JSSE";
}
+ @Override
public ServerSocketFactory getServerSocketFactory() {
ServerSocketFactory ssf = factory.getSocketFactory();
return ssf;
}
+ @Override
public SSLSupport getSSLSupport(Socket s) {
SSLSupport ssls = factory.getSSLSupport(s);
return ssls;
public JSSESocketFactory () {
}
+ @Override
public ServerSocket createSocket (int port)
throws IOException
{
return socket;
}
+ @Override
public ServerSocket createSocket (int port, int backlog)
throws IOException
{
return socket;
}
+ @Override
public ServerSocket createSocket (int port, int backlog,
InetAddress ifAddress)
throws IOException
return socket;
}
+ @Override
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
return asock;
}
+ @Override
public void handshake(Socket sock) throws IOException {
//we do getSession instead of startHandshake() so we can call this multiple times
SSLSession session = ((SSLSocket)sock).getSession();
return super.offer(o,timeout,unit); //forces the item onto the queue, to be used if the task is rejected
}
+ @Override
public boolean offer(Runnable o) {
//we can't do any checks
if (parent==null) return super.offer(o);