public class ClientJPIPChannel extends JPIPChannel
For further information about JPIP channels, see ISO/IEC 15444-9 section B.2
Modifier and Type | Field and Description |
---|---|
private int |
auxport
Definition in
JPIPResponseFields.auxport . |
private java.lang.String |
host
Definition in
JPIPResponseFields.host . |
private HTTPChannel |
httpChannel |
private java.lang.String |
localCID
It is a local channel identifier.
|
private java.lang.String |
path
Definition in
JPIPResponseFields.path . |
private java.util.ArrayList<java.lang.String> |
preferredTransportProtocols |
Constructor and Description |
---|
ClientJPIPChannel(java.util.ArrayList<java.lang.String> preferredTransportProtocols,
CacheManagement cache,
CADILog log)
Constructor.
|
ClientJPIPChannel(java.util.ArrayList<java.lang.String> preferredTransportProtocols,
java.lang.String server,
int port,
CacheManagement cache,
CADILog log)
Constructor.
|
ClientJPIPChannel(java.util.ArrayList<java.lang.String> preferredTransportProtocols,
java.lang.String server,
int port,
java.lang.String proxyServer,
int proxyPort,
CacheManagement cache,
CADILog log)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected java.lang.String |
generateCID()
Generates a unique channel identifier.
|
long |
getBytesJPIPMessageBody()
Returns the
#bytesJPIPMessageBody attribute. |
long |
getBytesJPIPMessageHeader()
Returns the
#bytesJPIPMessageHeader attribute. |
java.lang.String |
getCID()
Returns the
JPIPChannel.cid attribute. |
java.lang.String |
getCSF()
Returns the
JPIPChannel.csf attribute. |
long |
getDownloadedBytes()
Returns the total bytes downloaded for the actual logical target.
|
JPIPResponseFields |
getJPIPResponseFields() |
java.lang.String |
getLocalCID()
Returns the
localCID attribute. |
void |
getRequest(JPIPRequestFields jpipRequestFields) |
void |
getRequest(java.lang.String requestURI) |
java.lang.String |
getRequestedURI() |
boolean |
isKeepAlive()
Returns whether the HTTP keep alive feature is or not set.
|
void |
list(java.io.PrintStream out)
Prints this Channel out to the specified output stream.
|
void |
resetJPIPMessagesCounters()
Sets the JPIP message counter to 0.
|
void |
setAccept(java.util.ArrayList<java.lang.String> accept) |
void |
setCID(java.lang.String cid) |
void |
setCSF(java.lang.String csf)
Sets the
JPIPChannel.csf attribute. |
void |
setDebug(java.lang.String debug) |
void |
setKeepAlive(boolean keepAlive) |
void |
setUserAgent(java.lang.String userAgent) |
void |
setVia(java.lang.String via) |
java.lang.String |
toString() |
private java.lang.String localCID
JPIPChannel.cid
because the value of the latter one is set by the server, and it could
not be set. However, the localCID
is set by the constructor of
the object.private java.lang.String host
JPIPResponseFields.host
.private java.lang.String path
JPIPResponseFields.path
.private int auxport
JPIPResponseFields.auxport
.private HTTPChannel httpChannel
private java.util.ArrayList<java.lang.String> preferredTransportProtocols
public ClientJPIPChannel(java.util.ArrayList<java.lang.String> preferredTransportProtocols, CacheManagement cache, CADILog log)
transport
- cache
- log
- public ClientJPIPChannel(java.util.ArrayList<java.lang.String> preferredTransportProtocols, java.lang.String server, int port, CacheManagement cache, CADILog log)
transport
- server
- port
- cache
- log
- public ClientJPIPChannel(java.util.ArrayList<java.lang.String> preferredTransportProtocols, java.lang.String server, int port, java.lang.String proxyServer, int proxyPort, CacheManagement cache, CADILog log)
transport
- server
- port
- proxyServer
- proxyPort
- cache
- log
- public void close()
public void setCID(java.lang.String cid)
cid
- public java.lang.String getCID()
JPIPChannel.cid
attribute.JPIPChannel.cid
attribute.public java.lang.String getLocalCID()
localCID
attribute.localCID
attribute.public java.lang.String getCSF()
JPIPChannel.csf
attribute.JPIPChannel.csf
attribute.public void setCSF(java.lang.String csf)
JPIPChannel.csf
attribute.csf
- the JPIPChannel.csf
to be set.public void setKeepAlive(boolean keepAlive)
keepAlive
- public boolean isKeepAlive()
public void setAccept(java.util.ArrayList<java.lang.String> accept)
accept
- public void setUserAgent(java.lang.String userAgent)
userAgent
- public void setDebug(java.lang.String debug)
userAgent
- public void setVia(java.lang.String via)
userAgent
- public java.lang.String getRequestedURI()
public void getRequest(java.lang.String requestURI) throws WarningException
requestURI
- WarningException
public void getRequest(JPIPRequestFields jpipRequestFields) throws WarningException
jpipRequestFields
- WarningException
public JPIPResponseFields getJPIPResponseFields()
public long getDownloadedBytes()
public void resetJPIPMessagesCounters()
public long getBytesJPIPMessageHeader()
#bytesJPIPMessageHeader
attribute.#bytesJPIPMessageHeader
attribute.public long getBytesJPIPMessageBody()
#bytesJPIPMessageBody
attribute.#bytesJPIPMessageBody
attribute.public java.lang.String toString()
toString
in class JPIPChannel
public void list(java.io.PrintStream out)
list
in class JPIPChannel
out
- an output stream.protected java.lang.String generateCID()
NOTICE: this method could be improved adding the Rijndael (or another one), client information, etc. to improve the security.
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)