public class ProxySessionTargets extends ClientSideSessionTargets
clientSessionTargets
Constructor and Description |
---|
ProxySessionTargets()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ProxySessionTarget session)
Deprecated.
this method has been deprecated due to synchonization problems.
It has been replaced by the
create(java.lang.String, int, java.lang.String, CADI.Common.Log.CADILog) or
create(java.lang.String, int, java.lang.String, java.util.ArrayList, CADI.Common.Log.CADILog) . |
boolean |
belongs(java.lang.String cid1,
java.lang.String cid2)
Checks whether the
cid1 and cid2 channel
identifiers belongs to the same session. |
void |
clear()
Remove all elements from the clients list
|
void |
closeSession(java.lang.String cid)
Closes all channels that belongs to the same sessions, so the session
is closed and removed from the sessions list.
|
boolean |
contains(java.lang.String cid)
Returns true if the clients list contains the specified element.
|
boolean |
containsSession(java.lang.String sid)
Returns true if the clients list contains the specified element.
|
ProxySessionTarget |
create(java.lang.String server,
int port,
java.lang.String target,
java.util.ArrayList<java.lang.String> preferredTransportProtocols,
CADILog log)
Creates a new session target.
|
ProxySessionTarget |
create(java.lang.String server,
int port,
java.lang.String target,
CADILog log)
Creates a new session target.
|
boolean |
equals(java.lang.String target,
java.lang.String tid)
Check if the logical target identified
|
boolean |
equalsByProxyTID(java.lang.String target,
java.lang.String proxyTID)
Check if the logical target identified
|
ProxySessionTarget |
getByProxyTID(java.lang.String proxyTID) |
ProxySessionTarget |
getBySID(java.lang.String sid) |
ProxySessionTarget |
getByTarget(java.lang.String target)
Gets a logical target from the list.
|
ProxySessionTarget |
getByTID(java.lang.String tid)
Gets a logical target from the list.
|
private ProxySessionTarget |
getTargetAndProxyTID(java.lang.String target,
java.lang.String proxyTID)
Gets a logical target from the list.
|
boolean |
isEmpty()
Checks if there is a empty list of sessions.
|
void |
list(java.io.PrintStream out)
Prints this Logical Target List fields out to the specified output
stream.
|
java.util.ArrayList<java.lang.String> |
ProxyTIDKeyList() |
void |
remove(java.lang.String cid)
Removes the element that it is identifier by its session identifier.
|
java.util.ArrayList<java.lang.String> |
SIDKeyList() |
int |
size()
Returns the number of sessions.
|
java.lang.String |
toString() |
findSID
public ProxySessionTarget create(java.lang.String server, int port, java.lang.String target, CADILog log)
create
in class ClientSideSessionTargets
server
- server where the target is hosted.port
- port number of the server.target
- definition in TargetField.target
.log
- a CADILog
object.ProxySessionTarget
object.public ProxySessionTarget create(java.lang.String server, int port, java.lang.String target, java.util.ArrayList<java.lang.String> preferredTransportProtocols, CADILog log)
create
in class ClientSideSessionTargets
server
- server where the target is hosted.port
- port number of the server.target
- definition in TargetField.target
.preferredTransportProtocols
- definition in ClientSideSessionTarget.preferredTransportProtocols
.log
- a CADILog
object.ProxySessionTarget
object.@Deprecated public void add(ProxySessionTarget session)
create(java.lang.String, int, java.lang.String, CADI.Common.Log.CADILog)
or
create(java.lang.String, int, java.lang.String, java.util.ArrayList, CADI.Common.Log.CADILog)
.session
- element to be appended to this list.public void remove(java.lang.String cid)
remove
in class ClientSideSessionTargets
cid
- the channel identifier.public ProxySessionTarget getBySID(java.lang.String sid)
getBySID
in class ClientSideSessionTargets
public boolean contains(java.lang.String cid)
contains
in class ClientSideSessionTargets
cid
- public java.util.ArrayList<java.lang.String> SIDKeyList()
SIDKeyList
in class ClientSideSessionTargets
public java.util.ArrayList<java.lang.String> ProxyTIDKeyList()
public boolean containsSession(java.lang.String sid)
containsSession
in class ClientSideSessionTargets
cid
- public boolean belongs(java.lang.String cid1, java.lang.String cid2)
cid1
and cid2
channel
identifiers belongs to the same session.belongs
in class ClientSideSessionTargets
cid1
- a channel identifier.cid2
- a channel identifier.true
if both channel identifiers belong to the same
session. Otherwise, returns false
.public ProxySessionTarget getByTID(java.lang.String tid)
tid
).
getByTID
in class ClientSideSessionTargets
tid
- definition in TargetField.target
.tid is not in the list, it returns null
public ProxySessionTarget getByProxyTID(java.lang.String proxyTID)
proxyTID
- definition in ProxySessionTarget.proxyTID
.public ProxySessionTarget getByTarget(java.lang.String target)
target
.
getByTarget
in class ClientSideSessionTargets
target
- definition in TargetField.target
.target is not in the list, it returns null
public boolean equals(java.lang.String target, java.lang.String tid)
equals
in class ClientSideSessionTargets
target
- definition in TargetField.target
.tid
- definition in TargetField.tid
.true
if the target
belongs to the
target identifier tid
.public boolean equalsByProxyTID(java.lang.String target, java.lang.String proxyTID)
target
- definition in TargetField.target
.tid
- definition in TargetField.tid
.true
if the target
belongs to the
target identifier tid
.public void closeSession(java.lang.String cid)
closeSession
in class ClientSideSessionTargets
cid
- the unique channel identifier.public int size()
size
in class ClientSideSessionTargets
public boolean isEmpty()
isEmpty
in class ClientSideSessionTargets
true
if there is not any sessions. Otherwise,
returns false
.public void clear()
clear
in class ClientSideSessionTargets
public java.lang.String toString()
toString
in class ClientSideSessionTargets
public void list(java.io.PrintStream out)
list
in class ClientSideSessionTargets
out
- an output stream.private ProxySessionTarget getTargetAndProxyTID(java.lang.String target, java.lang.String proxyTID)
target
and/or tid
. If the target
and tid
parameters do not identify the same target
an exception is thrown.target
- definition in TargetField.target
.proxyTID
- definition in ProxySessionTarget.proxyTID
.target is not in the list, it returns null
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)