public class ClientSessionTargets extends ClientSideSessionTargets
clientSessionTargets
Constructor and Description |
---|
ClientSessionTargets()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
ClientSessionTarget |
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.
|
ClientSessionTarget |
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
|
ClientSessionTarget |
getBySID(java.lang.String sid) |
ClientSessionTarget |
getByTarget(java.lang.String target)
Gets a logical target from the list.
|
ClientSessionTarget |
getByTID(java.lang.String tid)
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.
|
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 ClientSessionTarget 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 ClientSessionTarget 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.public void remove(java.lang.String cid)
remove
in class ClientSideSessionTargets
cid
- the channel identifier.public ClientSessionTarget 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 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 ClientSessionTarget 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 ClientSessionTarget 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 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.
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)