proj_name stringclasses 131
values | relative_path stringlengths 30 228 | class_name stringlengths 1 68 | func_name stringlengths 1 48 | masked_class stringlengths 78 9.82k | func_body stringlengths 46 9.61k | len_input int64 29 2.01k | len_output int64 14 1.94k | total int64 55 2.05k | relevant_context stringlengths 0 38.4k |
|---|---|---|---|---|---|---|---|---|---|
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQPrivateHandler.java | IQPrivateHandler | handleIQ | class IQPrivateHandler extends IQHandler implements ServerFeaturesProvider {
private static final Logger Log = LoggerFactory.getLogger(IQPrivacyHandler.class);
public static final String NAMESPACE = "jabber:iq:private";
private IQHandlerInfo info;
private PrivateStorage privateStorage = null;
pu... |
IQ replyPacket = IQ.createResultIQ(packet);
Element child = packet.getChildElement();
Element dataElement = child.elementIterator().next();
if ( !UserManager.getInstance().isRegisteredUser( packet.getFrom(), false ) ) {
Log.trace("Responding with 'service-unavailable': ser... | 292 | 436 | 728 | <methods>public void <init>(java.lang.String) ,public abstract org.jivesoftware.openfire.IQHandlerInfo getInfo() ,public abstract IQ handleIQ(IQ) throws org.jivesoftware.openfire.auth.UnauthorizedException,public void initialize(org.jivesoftware.openfire.XMPPServer) ,public boolean performNoSuchUserCheck() ,public void... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQSessionEstablishmentHandler.java | IQSessionEstablishmentHandler | handleIQ | class IQSessionEstablishmentHandler extends IQHandler {
private IQHandlerInfo info;
public IQSessionEstablishmentHandler() {
super("Session Establishment handler");
info = new IQHandlerInfo("session", "urn:ietf:params:xml:ns:xmpp-session");
}
@Override
public boolean performNoSuch... |
// Just answer that the session has been activated
IQ reply = IQ.createResultIQ(packet);
return reply;
| 171 | 36 | 207 | <methods>public void <init>(java.lang.String) ,public abstract org.jivesoftware.openfire.IQHandlerInfo getInfo() ,public abstract IQ handleIQ(IQ) throws org.jivesoftware.openfire.auth.UnauthorizedException,public void initialize(org.jivesoftware.openfire.XMPPServer) ,public boolean performNoSuchUserCheck() ,public void... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQSharedGroupHandler.java | IQSharedGroupHandler | handleIQ | class IQSharedGroupHandler extends IQHandler {
private IQHandlerInfo info;
private String serverName;
private RosterManager rosterManager;
public IQSharedGroupHandler() {
super("Shared Groups Handler");
info = new IQHandlerInfo("sharedgroup", "http://www.jivesoftware.org/protocol/share... |
IQ result = IQ.createResultIQ(packet);
String username = packet.getFrom().getNode();
if (!serverName.equals(packet.getFrom().getDomain()) || username == null) {
// Users of remote servers are not allowed to get their "shared groups". Users of
// remote servers cannot hav... | 215 | 264 | 479 | <methods>public void <init>(java.lang.String) ,public abstract org.jivesoftware.openfire.IQHandlerInfo getInfo() ,public abstract IQ handleIQ(IQ) throws org.jivesoftware.openfire.auth.UnauthorizedException,public void initialize(org.jivesoftware.openfire.XMPPServer) ,public boolean performNoSuchUserCheck() ,public void... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQVersionHandler.java | IQVersionHandler | handleIQ | class IQVersionHandler extends IQHandler implements ServerFeaturesProvider {
private static Element bodyElement;
private IQHandlerInfo info;
private static final Logger Log = LoggerFactory.getLogger(IQVersionHandler.class);
public IQVersionHandler() {
super("XMPP Server Version Handler");
... |
if (IQ.Type.get == packet.getType()) {
// Could cache this information for every server we see
Element answerElement = bodyElement.createCopy();
try {
// Try to retrieve this for every request - security settings
// might be changed runtime!
... | 280 | 630 | 910 | <methods>public void <init>(java.lang.String) ,public abstract org.jivesoftware.openfire.IQHandlerInfo getInfo() ,public abstract IQ handleIQ(IQ) throws org.jivesoftware.openfire.auth.UnauthorizedException,public void initialize(org.jivesoftware.openfire.XMPPServer) ,public boolean performNoSuchUserCheck() ,public void... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQvCardHandler.java | IQvCardHandler | handleIQ | class IQvCardHandler extends IQHandler {
private static final Logger Log = LoggerFactory.getLogger(IQvCardHandler.class);
private IQHandlerInfo info;
private XMPPServer server;
private UserManager userManager;
public IQvCardHandler() {
super("XMPP vCard Handler");
info = new IQHan... |
IQ result = IQ.createResultIQ(packet);
IQ.Type type = packet.getType();
if (type.equals(IQ.Type.set)) {
try {
User user = userManager.getUser(packet.getFrom().getNode());
Element vcard = packet.getChildElement();
if (vcard != null) {
... | 224 | 1,047 | 1,271 | <methods>public void <init>(java.lang.String) ,public abstract org.jivesoftware.openfire.IQHandlerInfo getInfo() ,public abstract IQ handleIQ(IQ) throws org.jivesoftware.openfire.auth.UnauthorizedException,public void initialize(org.jivesoftware.openfire.XMPPServer) ,public boolean performNoSuchUserCheck() ,public void... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpBindBody.java | HttpBindBody | getPacketReader | class HttpBindBody
{
private static final Logger Log = LoggerFactory.getLogger( HttpBindBody.class );
private static XmlPullParserFactory factory;
static
{
try
{
factory = XmlPullParserFactory.newInstance( MXParser.class.getName(), null );
}
catch ( XmlPullP... |
// Reader is associated with a new XMPPPacketReader
XMPPPacketReader reader = localReader.get();
if ( reader == null )
{
reader = new XMPPPacketReader();
reader.setXPPFactory( factory );
localReader.set( reader );
}
return reader;
| 1,373 | 84 | 1,457 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpConnection.java | HttpConnection | deliverBody | class HttpConnection {
private static final Logger Log = LoggerFactory.getLogger(HttpConnection.class);
private final long requestId;
private final boolean isRestart;
private final Duration pause;
private final boolean isTerminate;
private final boolean isPoll;
@Nullable
private H... |
if (session == null) {
// This indicates that there's an implementation error in Openfire.
throw new IllegalStateException("Cannot be used before bound to a session.");
}
// We only want to use this function once so we will close it when the body is delivered.
s... | 1,670 | 161 | 1,831 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/http/ResourceServlet.java | ResourceServlet | getJavaScriptContent | class ResourceServlet extends HttpServlet {
private static final Logger Log = LoggerFactory.getLogger(ResourceServlet.class);
// private static String suffix = ""; // Set to "_src" to use source version
private static final Duration expiresOffset = Duration.ofDays(10); // This long until client cach... |
StringWriter writer = new StringWriter();
for(String file : getJavascriptFiles()) {
writer.write(getJavaScriptFile(file));
}
if (compress) {
try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
try (GZIPOutputStream gzos = new... | 1,285 | 159 | 1,444 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/http/SessionEventDispatcher.java | SessionEventDispatcher | addListener | class SessionEventDispatcher
{
private static final Logger Log = LoggerFactory.getLogger( SessionEventDispatcher.class );
private static final Set<SessionListener> listeners = new CopyOnWriteArraySet<>();
private SessionEventDispatcher()
{
// Not instantiable.
}
/**
* Adds a {@li... |
if ( listener == null )
{
throw new NullPointerException();
}
listeners.add( listener );
| 679 | 33 | 712 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/http/TempFileToucherTask.java | TempFileToucherTask | run | class TempFileToucherTask extends TimerTask
{
private final static Logger Log = LoggerFactory.getLogger( TempFileToucherTask.class );
private final Server server;
public TempFileToucherTask( final Server server )
{
this.server = server;
}
@Override
public void run()
{<FILL_FUN... |
final FileTime now = FileTime.fromMillis( System.currentTimeMillis() );
for ( final Handler handler : this.server.getChildHandlersByClass( WebAppContext.class ) )
{
final File tempDirectory = ((WebAppContext) handler).getTempDirectory();
try
{
... | 107 | 297 | 404 | <methods>public boolean cancel() ,public abstract void run() ,public long scheduledExecutionTime() <variables>static final int CANCELLED,static final int EXECUTED,static final int SCHEDULED,static final int VIRGIN,final java.lang.Object lock,long nextExecutionTime,long period,int state |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/keystore/CertificateStore.java | CertificateStore | delete | class CertificateStore
{
private static final Logger Log = LoggerFactory.getLogger( CertificateStore.class );
protected static final Provider PROVIDER = new BouncyCastleProvider();
static
{
// Add the BC provider to the list of security providers
Security.addProvider( PROVIDER );
}... |
// Input validation
if ( alias == null || alias.trim().isEmpty() )
{
throw new IllegalArgumentException( "Argument 'alias' cannot be null or an empty String." );
}
try
{
if ( !store.containsAlias( alias ) )
{
Log.info(... | 1,423 | 191 | 1,614 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/keystore/CertificateStoreConfiguration.java | CertificateStoreConfiguration | equals | class CertificateStoreConfiguration
{
protected final String type;
protected final File file;
protected final char[] password;
protected final File backupDirectory;
/**
* Creates a new instance.
*
* @param type The store type (jks, jceks, pkcs12, etc). Cannot be null or an empty stri... |
if ( this == o ) { return true; }
if ( o == null || getClass() != o.getClass() ) { return false; }
final CertificateStoreConfiguration that = (CertificateStoreConfiguration) o;
return Objects.equals( type, that.type ) &&
Objects.equals( file, that.file ) &&
Array... | 662 | 115 | 777 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/keystore/CertificateStoreWatcher.java | CertificateStoreWatcher | run | class CertificateStoreWatcher
{
public static final SystemProperty<Boolean> ENABLED = SystemProperty.Builder.ofType( Boolean.class )
.setKey( "cert.storewatcher.enabled" )
.setDefaultValue( true )
.setDynamic( false )
.build();
private static final Logger Log = LoggerFactory.get... |
while ( !executorService.isShutdown() )
{
final WatchKey key;
try
{
key = storeWatcher.poll( 5, TimeUnit.SECONDS );
}
catch ( Inter... | 1,290 | 671 | 1,961 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapAuthProvider.java | LdapAuthProvider | authenticate | class LdapAuthProvider implements AuthProvider {
private static final Logger Log = LoggerFactory.getLogger(LdapAuthProvider.class);
private LdapManager manager;
private Cache<String, String> authCache = null;
public LdapAuthProvider() {
// Convert XML based provider setup to Database based
... |
if (username == null || password == null || "".equals(password.trim())) {
throw new UnauthorizedException();
}
if (username.contains("@")) {
// Check that the specified domain matches the server's domain
int index = username.indexOf("@");
String ... | 487 | 675 | 1,162 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapAuthorizationMapping.java | LdapAuthorizationMapping | map | class LdapAuthorizationMapping implements AuthorizationMapping {
private static final Logger Log = LoggerFactory.getLogger(LdapAuthorizationMapping.class);
private LdapManager manager;
private String princField;
private String princSearchFilter;
public LdapAuthorizationMapping() {
// Conv... |
String authzid = authcid;
DirContext ctx = null;
try {
Log.debug("LdapAuthorizationMapping: Starting LDAP search...");
String usernameField = manager.getUsernameField();
//String baseDN = manager.getBaseDN();
boolean subTreeSearch = manager.isSubT... | 483 | 462 | 945 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapAuthorizationPolicy.java | LdapAuthorizationPolicy | getAuthorized | class LdapAuthorizationPolicy implements AuthorizationPolicy {
private static final Logger Log = LoggerFactory.getLogger(LdapAuthorizationPolicy.class) ;
private LdapManager manager;
private String usernameField;
private String authorizeField;
public LdapAuthorizationPolicy() {
// Convert... |
// Un-escape Node
authzid = JID.unescapeNode(authzid);
Collection<String> authorized = new ArrayList<>();
DirContext ctx = null;
try {
Rdn[] userRDN = manager.findUserRDN(authzid);
// Load record.
String[] attributes = new String[]{
... | 623 | 347 | 970 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/lockout/DefaultLockOutProvider.java | DefaultLockOutProvider | getDisabledStatus | class DefaultLockOutProvider implements LockOutProvider {
private static final Logger Log = LoggerFactory.getLogger(DefaultLockOutProvider.class);
private static final String FLAG_ID = "lockout";
private static final String DELETE_FLAG =
"DELETE FROM ofUserFlag WHERE username=? AND name='"+FLA... |
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
LockOutFlag ret = null;
try {
con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(RETRIEVE_FLAG);
pstmt.setString(1, username);
rs = ps... | 1,168 | 288 | 1,456 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/lockout/LockOutEventDispatcher.java | LockOutEventDispatcher | lockedAccountDenied | class LockOutEventDispatcher {
private static final Logger Log = LoggerFactory.getLogger(LockOutEventDispatcher.class);
private static List<LockOutEventListener> listeners =
new CopyOnWriteArrayList<>();
/**
* Registers a listener to receive events.
*
* @param listener the liste... |
if (!listeners.isEmpty()) {
for (LockOutEventListener listener : listeners) {
try {
listener.lockedAccountDenied(username);
} catch (Exception e) {
Log.warn("An exception occurred while dispatching a 'lockedAccountDenied' event... | 554 | 84 | 638 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/lockout/LockOutFlag.java | LockOutFlag | getCachedSize | class LockOutFlag implements Cacheable, Externalizable {
private String username;
private Date startTime = null;
private Date endTime = null;
/**
* Constructor added for Externalizable. Do not use this constructor.
*/
public LockOutFlag() {
}
/**
* Creates a representation... |
// Approximate the size of the object in bytes by calculating the size
// of each field.
int size = 0;
size += CacheSizes.sizeOfObject(); // overhead of object
size += CacheSizes.sizeOfString(username);
size += CacheSizes.sizeOfDate();
size += CacheS... | 853 | 95 | 948 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/lockout/LockOutManager.java | LockOutManagerContainer | initProvider | class LockOutManagerContainer {
private static LockOutManager instance = new LockOutManager();
}
/**
* Returns the currently-installed LockOutProvider. <b>Warning:</b> in virtually all
* cases the lockout provider should not be used directly. Instead, the appropriate
* methods in LockOut... |
if (provider == null || !clazz.equals(provider.getClass())) {
try {
provider = (LockOutProvider) clazz.newInstance();
}
catch (Exception e) {
Log.error("Error loading lockout provider: " + clazz.getName(), e);
provider = new De... | 405 | 90 | 495 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/mediaproxy/Channel.java | Channel | cancel | class Channel implements Runnable {
private static final Logger Log = LoggerFactory.getLogger(Channel.class);
protected byte[] buf = new byte[5000];
protected DatagramSocket dataSocket;
protected DatagramPacket packet;
protected boolean enabled = true;
List<DatagramListener> listeners = n... |
this.enabled = false;
if (dataSocket != null){
dataSocket.close();
}
| 1,050 | 31 | 1,081 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/mediaproxy/DynamicAddressChannel.java | DynamicAddressChannel | handle | class DynamicAddressChannel extends Channel implements Runnable, DatagramListener {
private int c = 0;
/**
* Default Channel Constructor
*
* @param dataSocket datasocket to used to send and receive packets
* @param host default destination host for received packets
* @param port ... |
// Relay Destination
if (c++ < 100) { // 100 packets are enough to discover relay address
this.setHost(packet.getAddress());
this.setPort(packet.getPort());
return true;
} else {
c = 1000; // Prevents long overflow
// Check Source Addr... | 249 | 121 | 370 | <methods>public void <init>(java.net.DatagramSocket, java.net.InetAddress, int) ,public void addListener(org.jivesoftware.openfire.mediaproxy.DatagramListener) ,public void cancel() ,public java.net.InetAddress getHost() ,public int getPort() ,public void relayPacket(java.net.DatagramPacket) ,public void removeListener... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/mediaproxy/Echo.java | Echo | run | class Echo implements Runnable {
private static final Logger Log = LoggerFactory.getLogger(Echo.class);
DatagramSocket socket = null;
byte password[] = null;
List<DatagramListener> listeners = new ArrayList<>();
boolean enabled = true;
public Echo(int port) throws UnknownHostException, SocketEx... |
try {
//System.out.println("Listening for ECHO: " + socket.getLocalAddress().getHostAddress() + ":" + socket.getLocalPort());
while (true) {
DatagramPacket packet = new DatagramPacket(new byte[8], 8);
socket.receive(packet);
System.out.... | 170 | 313 | 483 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/mediaproxy/RelaySession.java | RelaySession | createChannels | class RelaySession extends MediaProxySession {
/**
* Creates a new Smart Session to provide connectivity between Host A and Host B.
*
* @param id of the Session (Could be a Jingle session ID)
* @param localhost The localhost IP that will listen for UDP packets
* @param hostA the... |
channelAtoB = new DynamicAddressChannel(socketA, hostB, portB);
channelAtoBControl = new DynamicAddressChannel(socketAControl, hostB, portB + 1);
channelBtoA = new DynamicAddressChannel(socketB, hostA, portA);
channelBtoAControl = new DynamicAddressChannel(socketBControl, hostA, portA +... | 644 | 99 | 743 | <methods>public void <init>(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, int, int, int) ,public void addAgentListener(org.jivesoftware.openfire.mediaproxy.SessionListener) ,public void clearAgentListeners() ,public boolean datagramReceived(java.net.DatagramPacket) ,publ... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/HistoryRequest.java | HistoryRequest | sendHistory | class HistoryRequest {
private static final Logger Log = LoggerFactory.getLogger(HistoryRequest.class);
private static final XMPPDateTimeFormat xmppDateTime = new XMPPDateTimeFormat();
private int maxChars = -1;
private int maxStanzas = -1;
private int seconds = -1;
private Date since;
pu... |
if (!isConfigured()) {
Iterator<Message> history = roomHistory.getMessageHistory();
while (history.hasNext()) {
// OF-2163: Create a defensive copy of the message, to prevent the address that it is sent to to leak back into the archive.
joinRole.send(hist... | 833 | 739 | 1,572 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCEventDelegate.java | MUCEventDelegate | loadConfig | class MUCEventDelegate {
public enum InvitationResult {
HANDLED_BY_DELEGATE,
HANDLED_BY_OPENFIRE,
REJECTED
};
public enum InvitationRejectionResult {
HANDLED_BY_DELEGATE,
HANDLED_BY_OPENFIRE,
};
/**
* This event will be triggered when an entity joi... |
Map<String, String> roomConfig = getRoomConfig(room.getName());
if (roomConfig != null) {
room.setNaturalLanguageName(roomConfig.get("muc#roomconfig_roomname"));
room.setDescription(roomConfig.get("muc#roomconfig_roomdesc"));
room.setCanOccupantsChangeSubject("1".equ... | 969 | 513 | 1,482 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCEventDispatcher.java | MUCEventDispatcher | roomCreated | class MUCEventDispatcher {
private static final Logger Log = LoggerFactory.getLogger(MUCEventDispatcher.class);
private static final Collection<MUCEventListener> listeners = new ConcurrentLinkedQueue<>();
public static void addListener(MUCEventListener listener) {
listeners.add(listener);
}
... |
for (MUCEventListener listener : listeners) {
try {
listener.roomCreated(roomJID);
} catch (Exception e) {
Log.warn("An exception occurred while dispatching a 'roomCreated' event!", e);
}
}
| 857 | 68 | 925 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/MUCServicePropertyClusterEventTask.java | MUCServicePropertyClusterEventTask | writeExternal | class MUCServicePropertyClusterEventTask implements ClusterTask<Void> {
private Type event;
private String service;
private String key;
private String value;
public static MUCServicePropertyClusterEventTask createPutTask(String service, String key, String value) {
MUCServicePropertyClusterE... |
ExternalizableUtil.getInstance().writeInt(out, event.ordinal());
ExternalizableUtil.getInstance().writeSafeUTF(out, service);
ExternalizableUtil.getInstance().writeSafeUTF(out, key);
ExternalizableUtil.getInstance().writeBoolean(out, value != null);
if (value != null) {
... | 527 | 105 | 632 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/NewClusterMemberJoinedTask.java | NewClusterMemberJoinedTask | readExternal | class NewClusterMemberJoinedTask implements ClusterTask<Void> {
private static final Logger Log = LoggerFactory.getLogger(NewClusterMemberJoinedTask.class);
private NodeID originator;
public NewClusterMemberJoinedTask() {
this.originator = XMPPServer.getInstance().getNodeID();
}
public No... |
final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
originator = (NodeID) externalizableUtil.readSerializable(in);
| 282 | 40 | 322 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/OccupantAddedTask.java | OccupantAddedTask | readExternal | class OccupantAddedTask implements ClusterTask<Void>
{
private String subdomain;
private String roomName;
private String nickname;
private JID realJID;
private NodeID originator;
public OccupantAddedTask() {}
public OccupantAddedTask(@Nonnull final String subdomain, @Nonnull final String r... |
final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
subdomain = externalizableUtil.readSafeUTF(in);
roomName = externalizableUtil.readSafeUTF(in);
nickname = externalizableUtil.readSafeUTF(in);
realJID = (JID) externalizableUtil.readSerializable(in);
... | 528 | 105 | 633 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/OccupantKickedForNicknameTask.java | OccupantKickedForNicknameTask | readExternal | class OccupantKickedForNicknameTask implements ClusterTask<Void>
{
private String subdomain;
private String roomName;
private String nickname;
private NodeID originator;
public OccupantKickedForNicknameTask() {}
public OccupantKickedForNicknameTask(@Nonnull final String subdomain, @Nonnull fin... |
final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
subdomain = externalizableUtil.readSafeUTF(in);
roomName = externalizableUtil.readSafeUTF(in);
nickname = externalizableUtil.readSafeUTF(in);
originator = (NodeID) externalizableUtil.readSerializable... | 475 | 85 | 560 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/OccupantRemovedTask.java | OccupantRemovedTask | readExternal | class OccupantRemovedTask implements ClusterTask<Void>
{
private String subdomain;
private String roomName;
private String nickname;
private JID realJID;
private NodeID originator;
public OccupantRemovedTask() {}
public OccupantRemovedTask(@Nonnull final String subdomain, @Nonnull final St... |
final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
subdomain = externalizableUtil.readSafeUTF(in);
roomName = externalizableUtil.readSafeUTF(in);
nickname = externalizableUtil.readSafeUTF(in);
realJID = (JID) externalizableUtil.readSerializable(in);
... | 532 | 105 | 637 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/OccupantUpdatedTask.java | OccupantUpdatedTask | writeExternal | class OccupantUpdatedTask implements ClusterTask<Void>
{
private String subdomain;
private String roomName;
private String oldNickname;
private String newNickname;
private JID realJID;
private NodeID originator;
public OccupantUpdatedTask() {}
public OccupantUpdatedTask(@Nonnull final ... |
final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
externalizableUtil.writeSafeUTF(out, subdomain);
externalizableUtil.writeSafeUTF(out, roomName);
externalizableUtil.writeSafeUTF(out, oldNickname);
externalizableUtil.writeSafeUTF(out, newNickname);
... | 614 | 116 | 730 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/ServiceAddedEvent.java | ServiceAddedEvent | readExternal | class ServiceAddedEvent implements ClusterTask<Void> {
private String subdomain;
private String description;
private Boolean isHidden;
public ServiceAddedEvent() {
}
public ServiceAddedEvent(String subdomain, String description, Boolean isHidden) {
this.subdomain = subdomain;
t... |
final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
subdomain = externalizableUtil.readSafeUTF(in);
description = externalizableUtil.readSafeUTF(in);
isHidden = externalizableUtil.readBoolean(in);
| 389 | 65 | 454 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/ServiceUpdatedEvent.java | ServiceUpdatedEvent | run | class ServiceUpdatedEvent implements ClusterTask<Void> {
private static final Logger Log = LoggerFactory.getLogger(ServiceUpdatedEvent.class);
private String subdomain;
public ServiceUpdatedEvent() {
}
public ServiceUpdatedEvent(String subdomain) {
this.subdomain = subdomain;
}
... |
MultiUserChatService service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain);
if (service != null) {
// Reload properties from database (OF-2164)
XMPPServer.getInstance().getMultiUserChatManager().refreshService(subdomain);
if ... | 216 | 248 | 464 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/cluster/SyncLocalOccupantsAndSendJoinPresenceTask.java | SyncLocalOccupantsAndSendJoinPresenceTask | readExternal | class SyncLocalOccupantsAndSendJoinPresenceTask implements ClusterTask<Void>
{
private static final Logger Log = LoggerFactory.getLogger(SyncLocalOccupantsAndSendJoinPresenceTask.class);
private String subdomain;
private Set<OccupantManager.Occupant> occupants = new HashSet<>();
private NodeID originat... |
final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
subdomain = externalizableUtil.readSafeUTF(in);
final long size = externalizableUtil.readLong(in);
this.occupants = new HashSet<>();
for (long i=0; i<size; i++) {
final String roomName = ... | 632 | 203 | 835 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQMuclumbusSearchHandler.java | SearchParameters | toString | class SearchParameters
{
String q = null;
boolean sinname = true;
boolean sindescription = true;
boolean sinaddr = true;
int minUsers = 1;
Key key = Key.address;
public String getQ()
{
return q;
}
public void setQ( final S... |
return "SearchParameters{" +
"q='" + q + '\'' +
", sinname=" + sinname +
", sindescription=" + sindescription +
", sinaddr=" + sinaddr +
", minUsers=" + minUsers +
", key=" + key +
'}';
| 386 | 83 | 469 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MUCServicePropertyEventDispatcher.java | MUCServicePropertyEventDispatcher | addListener | class MUCServicePropertyEventDispatcher {
private static final Logger Log = LoggerFactory.getLogger(MUCServicePropertyEventDispatcher.class);
private static Set<MUCServicePropertyEventListener> listeners =
new CopyOnWriteArraySet<>();
private MUCServicePropertyEventDispatcher() {
// N... |
if (listener == null) {
throw new NullPointerException();
}
listeners.add(listener);
| 498 | 33 | 531 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java | UserTimeoutTask | checkForTimedOutUsers | class UserTimeoutTask extends TimerTask {
@Override
public void run() {
checkForTimedOutUsers();
}
}
/**
* Informs all users local to this cluster node that he or she is being removed from the room because the MUC
* service is being shut down.
*
* The imp... |
for (final OccupantManager.Occupant occupant : occupantManager.getLocalOccupants())
{
try
{
if (userIdleKick != null && occupant.getLastActive().isBefore(Instant.now().minus(userIdleKick)))
{
// Kick users if 'user_idle' featur... | 1,386 | 443 | 1,829 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/multiplex/ClientSessionConnection.java | ClientSessionConnection | closeVirtualConnection | class ClientSessionConnection extends VirtualConnection {
private String connectionManagerName;
private String serverName;
private ConnectionMultiplexerManager multiplexerManager;
private String hostName;
private String hostAddress;
public ClientSessionConnection(String connectionManagerName, ... |
// Figure out who requested the connection to be closed
StreamID streamID = session.getStreamID();
if (multiplexerManager.getClientSession(connectionManagerName, streamID) == null) {
// Client or Connection manager requested to close the session
// Do nothing since it ha... | 1,523 | 316 | 1,839 | <methods>public non-sealed void <init>() ,public void addCompression() ,public void close(StreamError, boolean) ,public abstract void closeVirtualConnection(StreamError) ,public java.security.cert.Certificate[] getLocalCertificates() ,public org.jivesoftware.openfire.PacketDeliverer getPacketDeliverer() ,public java.se... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/multiplex/MultiplexerPacketDeliverer.java | MultiplexerPacketDeliverer | deliver | class MultiplexerPacketDeliverer implements PacketDeliverer {
private static final Logger Log = LoggerFactory.getLogger(MultiplexerPacketDeliverer.class);
private OfflineMessageStrategy messageStrategy;
private String connectionManagerDomain;
private ConnectionMultiplexerManager multiplexerManager;
... |
// Check if we can send the packet using another session
if (connectionManagerDomain == null) {
// Packet deliverer has not yet been configured so handle unprocessed packet
handleUnprocessedPacket(packet);
}
else {
// Try getting another session to th... | 593 | 184 | 777 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/multiplex/Route.java | Route | getChildElement | class Route extends Packet {
/**
* Constructs a new Route.
*
* @param streamID the stream ID that identifies the connection that is actually sending
* the wrapped stanza.
*/
public Route(StreamID streamID) {
this.element = docFactory.createDocument().addElement(... |
List elements = element.elements();
if (elements.isEmpty()) {
return null;
}
else {
// Return the first child element
return (Element) elements.get(0);
}
| 676 | 56 | 732 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/AbstractConnection.java | AbstractConnection | notifyCloseListeners | class AbstractConnection implements Connection
{
private static final Logger Log = LoggerFactory.getLogger(AbstractConnection.class);
/**
* The major version of XMPP being used by this connection (major_version.minor_version). In most cases, the version
* should be "1.0". However, older clients using... |
for( final Map.Entry<ConnectionCloseListener, Object> entry : closeListeners.entrySet() )
{
if (entry.getKey() != null) {
try {
entry.getKey().onConnectionClose(entry.getValue());
} catch (Exception e) {
Log.error("Erro... | 1,093 | 102 | 1,195 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/BlockingReadingMode.java | BlockingReadingMode | run | class BlockingReadingMode extends SocketReadingMode {
private static final Logger Log = LoggerFactory.getLogger(BlockingReadingMode.class);
public BlockingReadingMode(Socket socket, SocketReader socketReader) {
super(socket, socketReader);
}
/**
* A dedicated thread loop for reading the ... |
try {
final InputStream inputStream;
if (socketReader.directTLS ) {
inputStream = socketReader.connection.getTLSStreamHandler().getInputStream();
} else {
inputStream = socket.getInputStream();
}
socketReader.reader.get... | 1,371 | 624 | 1,995 | <methods><variables>protected static java.lang.String CHARSET,private static final Logger Log,protected java.net.Socket socket,protected org.jivesoftware.openfire.net.SocketReader socketReader |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/ClientStanzaHandler.java | ClientStanzaHandler | processUnknowPacket | class ClientStanzaHandler extends StanzaHandler {
private static final Logger Log = LoggerFactory.getLogger(ClientStanzaHandler.class);
public ClientStanzaHandler(PacketRouter router, Connection connection) {
super(router, connection);
}
@Override
protected boolean processUnknowPacket(Ele... |
if (CsiManager.isStreamManagementNonza(doc)) {
Log.trace("Client is sending client state indication nonza.");
((LocalClientSession) session).getCsiManager().process(doc);
return true;
}
return false;
| 485 | 66 | 551 | <methods>public void <init>(org.jivesoftware.openfire.PacketRouter, org.jivesoftware.openfire.Connection) ,public JID getAddress() ,public void process(java.lang.String, org.dom4j.io.XMPPPacketReader) throws java.lang.Exception,public void setSession(org.jivesoftware.openfire.session.LocalSession) <variables>private st... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/ComponentStanzaHandler.java | ComponentStanzaHandler | processUnknowPacket | class ComponentStanzaHandler extends StanzaHandler {
private static final Logger Log = LoggerFactory.getLogger(ComponentStanzaHandler.class);
public ComponentStanzaHandler(PacketRouter router, Connection connection) {
super(router, connection);
}
@Override
boolean processUnknowPacket(Elem... |
String tag = doc.getName();
if ("handshake".equals(tag)) {
// External component is trying to authenticate
if (!((LocalComponentSession) session).authenticate(doc.getStringValue())) {
Log.debug( "Closing session that failed to authenticate: {}", session );
... | 850 | 897 | 1,747 | <methods>public void <init>(org.jivesoftware.openfire.PacketRouter, org.jivesoftware.openfire.Connection) ,public JID getAddress() ,public void process(java.lang.String, org.dom4j.io.XMPPPacketReader) throws java.lang.Exception,public void setSession(org.jivesoftware.openfire.session.LocalSession) <variables>private st... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/MulticastDNSService.java | MulticastDNSService | run | class MulticastDNSService extends BasicModule {
private static final Logger Log = LoggerFactory.getLogger(MulticastDNSService.class);
private JmDNS jmdns;
public MulticastDNSService() {
super("Multicast DNS Service");
PropertyEventDispatcher.addListener(new PropertyEventListener() {
... |
int clientPortNum = -1;
int componentPortNum = -1;
final ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
if ( connectionManager != null )
{
clientPortNum = connectionManager.getPor... | 589 | 342 | 931 | <methods>public void <init>(java.lang.String) ,public void destroy() ,public java.lang.String getName() ,public void initialize(org.jivesoftware.openfire.XMPPServer) ,public void start() throws java.lang.IllegalStateException,public void stop() <variables>private java.lang.String name |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/MultiplexerStanzaHandler.java | MultiplexerStanzaHandler | processIQ | class MultiplexerStanzaHandler extends StanzaHandler {
private static final Logger Log = LoggerFactory.getLogger( MultiplexerStanzaHandler.class );
/**
* Handler of IQ packets sent from the Connection Manager to the server.
*/
private MultiplexerPacketHandler packetHandler;
public Multiplex... |
if (!session.isAuthenticated()) {
// Session is not authenticated so return error
IQ reply = new IQ();
reply.setChildElement(packet.getChildElement().createCopy());
reply.setID(packet.getID());
reply.setTo(packet.getFrom());
reply.setFrom(... | 908 | 143 | 1,051 | <methods>public void <init>(org.jivesoftware.openfire.PacketRouter, org.jivesoftware.openfire.Connection) ,public JID getAddress() ,public void process(java.lang.String, org.dom4j.io.XMPPPacketReader) throws java.lang.Exception,public void setSession(org.jivesoftware.openfire.session.LocalSession) <variables>private st... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/ServerTrustManager.java | ServerTrustManager | getAcceptedIssuers | class ServerTrustManager implements X509TrustManager {
private static final Logger Log = LoggerFactory.getLogger(ServerTrustManager.class);
/**
* KeyStore that holds the trusted CA
*/
private KeyStore trustStore;
public ServerTrustManager(KeyStore trustTrust) {
super();
this... |
if (JiveGlobals.getBooleanProperty(ConnectionSettings.Server.TLS_ACCEPT_SELFSIGNED_CERTS, false)) {
// Answer an empty list since we accept any issuer
return new X509Certificate[0];
}
else {
X509Certificate[] X509Certs = null;
try {
... | 613 | 360 | 973 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketPacketWriteHandler.java | SocketPacketWriteHandler | process | class SocketPacketWriteHandler implements ChannelHandler {
private static final Logger Log = LoggerFactory.getLogger(SocketPacketWriteHandler.class);
private XMPPServer server;
private RoutingTable routingTable;
public SocketPacketWriteHandler(RoutingTable routingTable) {
this.routingTable = ... |
try {
JID recipient = packet.getTo();
// Check if the target domain belongs to a remote server or a component
if (server.matchesComponent(recipient) || server.isRemote(recipient)) {
routingTable.routePacket(recipient, packet);
}
// The... | 140 | 320 | 460 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketUtil.java | SocketUtil | createSocketToXmppDomain | class SocketUtil
{
private final static Logger Log = LoggerFactory.getLogger( SocketUtil.class );
/**
* Creates a socket connection to an XMPP domain.
*
* This implementation uses DNS SRV records to find a list of remote hosts for the XMPP domain (as implemented by
* {@link DNSUtil#resolveX... |
Log.debug( "Creating a socket connection to XMPP domain '{}' ...", xmppDomain );
Log.debug( "Use DNS to resolve remote hosts for the provided XMPP domain '{}' (default port: {}) ...", xmppDomain, port );
final List<DNSUtil.HostAddress> remoteHosts = DNSUtil.resolveXMPPDomain( xmppDomain, port ... | 303 | 826 | 1,129 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/TLSStreamReader.java | TLSStreamReader | doRead | class TLSStreamReader {
/**
* <code>TLSWrapper</code> is a TLS wrapper for connections requiring TLS protocol.
*/
private TLSWrapper wrapper;
private ReadableByteChannel rbc;
/**
* <code>inNetBB</code> buffer keeps data read from socket.
*/
private ByteBuffer inNetBB;
/**... |
//System.out.println("doRead inNet position: " + inNetBB.position() + " capacity: " + inNetBB.capacity() + " (before read)");
// Read from the channel and fill inNetBB with the encrypted data
final int cnt = rbc.read(inNetBB);
if (cnt > 0) {
//System.out.println("doRead inN... | 1,280 | 568 | 1,848 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/TLSStreamWriter.java | TLSStreamWriter | resizeApplicationBuffer | class TLSStreamWriter {
/**
* <code>TLSWrapper</code> is a TLS wrapper for connections requiring TLS protocol.
*/
private TLSWrapper wrapper;
private WritableByteChannel wbc;
private ByteBuffer outAppData;
public TLSStreamWriter(TLSWrapper tlsWrapper, Socket socket) throws IOException ... |
// TODO Creating new buffers and copying over old one may not scale. Consider using views. Thanks to Noah for the tip.
if (outAppData.remaining() < increment) {
ByteBuffer bb = ByteBuffer.allocate(outAppData.capacity() + wrapper.getAppBuffSize());
outAppData.flip();
... | 827 | 117 | 944 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/VirtualConnection.java | VirtualConnection | close | class VirtualConnection extends AbstractConnection
{
private static final Logger Log = LoggerFactory.getLogger(VirtualConnection.class);
private final AtomicReference<State> state = new AtomicReference<State>(State.OPEN);
@Override
public Certificate[] getLocalCertificates() {
// Ignore
... |
if (state.compareAndSet(State.OPEN, State.CLOSED)) {
if (session != null) {
if (!networkInterruption) {
// A 'clean' closure should never be resumed (see #onRemoteDisconnect for handling of unclean disconnects). OF-2752
session.ge... | 672 | 339 | 1,011 | <methods>public non-sealed void <init>() ,public Set<Namespace> getAdditionalNamespaces() ,public int getMajorXMPPVersion() ,public int getMinorXMPPVersion() ,public org.jivesoftware.openfire.session.LocalSession getSession() ,public void init(org.jivesoftware.openfire.session.LocalSession) ,public void registerCloseLi... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/XMLSocketWriter.java | XMLSocketWriter | flush | class XMLSocketWriter extends XMLWriter {
private SocketConnection connection;
public XMLSocketWriter(Writer writer, SocketConnection connection) {
super( writer, DEFAULT_FORMAT );
this.connection = connection;
}
/**
* Flushes the underlying writer making sure that if the connect... |
// Register that we have started sending data
connection.writeStarted();
try {
super.flush();
}
finally {
// Register that we have finished sending data
connection.writeFinished();
}
| 147 | 59 | 206 | <methods>public void <init>(java.io.Writer) ,public void <init>(java.io.Writer, OutputFormat) ,public void <init>() throws java.io.UnsupportedEncodingException,public void <init>(java.io.OutputStream) throws java.io.UnsupportedEncodingException,public void <init>(java.io.OutputStream, OutputFormat) throws java.io.Unsup... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/net/XMPPCallbackHandler.java | XMPPCallbackHandler | handle | class XMPPCallbackHandler implements CallbackHandler {
private static final Logger Log = LoggerFactory.getLogger(XMPPCallbackHandler.class);
public XMPPCallbackHandler() {
}
@Override
public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
{<FILL_FUNCTI... |
String name = null;
for (Callback callback : callbacks) {
if (callback instanceof RealmCallback) {
((RealmCallback) callback).setText( XMPPServer.getInstance().getServerInfo().getXMPPDomain() );
}
else if (callback instanceof NameCallback) {
... | 93 | 756 | 849 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyClientConnectionHandler.java | NettyClientConnectionHandler | createNettyConnection | class NettyClientConnectionHandler extends NettyConnectionHandler{
/**
* Enable / disable backup delivery of stanzas to the 'offline message store' of the corresponding user when a stanza
* failed to be delivered on a client connection. When disabled, stanzas that can not be delivered on the connection
... |
final PacketDeliverer backupDeliverer = BACKUP_PACKET_DELIVERY_ENABLED.getValue() ? new OfflinePacketDeliverer() : null;
return new NettyConnection(ctx, backupDeliverer, configuration);
| 372 | 64 | 436 | <methods>public void channelRead0(ChannelHandlerContext, java.lang.String) ,public void channelUnregistered(ChannelHandlerContext) throws java.lang.Exception,public void exceptionCaught(ChannelHandlerContext, java.lang.Throwable) ,public abstract java.time.Duration getMaxIdleTime() ,public void handlerAdded(ChannelHand... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyComponentConnectionHandler.java | NettyComponentConnectionHandler | toString | class NettyComponentConnectionHandler extends NettyConnectionHandler {
/**
* Enable / disable backup delivery of stanzas to the XMPP server itself when a stanza failed to be delivered on a
* component connection. When disabled, stanzas that can not be delivered on the connection are discarded.
*/
... |
return "NettyComponentConnectionHandler{" +
"sslInitDone=" + sslInitDone +
", configuration=" + configuration +
'}';
| 389 | 42 | 431 | <methods>public void channelRead0(ChannelHandlerContext, java.lang.String) ,public void channelUnregistered(ChannelHandlerContext) throws java.lang.Exception,public void exceptionCaught(ChannelHandlerContext, java.lang.Throwable) ,public abstract java.time.Duration getMaxIdleTime() ,public void handlerAdded(ChannelHand... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnectionHandler.java | NettyConnectionHandler | channelRead0 | class NettyConnectionHandler extends SimpleChannelInboundHandler<String> {
private static final Logger Log = LoggerFactory.getLogger(NettyConnectionHandler.class);
static final AttributeKey<XMLLightweightParser> XML_PARSER = AttributeKey.valueOf("XML-PARSER");
public static final AttributeKey<NettyConnecti... |
// Get the parser to use to process stanza. For optimization there is going
// to be a parser for each running thread. Each Filter will be executed
// by the Executor placed as the first Filter. So we can have a parser associated
// to each Thread
final XMPPPacketReader parser =... | 1,608 | 355 | 1,963 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnectionHandlerFactory.java | NettyConnectionHandlerFactory | createConnectionHandler | class NettyConnectionHandlerFactory {
/**
* Creates a new NettyConnectionHandler based on the type of connection set in the configuration.
* @param configuration options for how the connection is configured
* @return a new NettyConnectionHandler
*/
public static NettyConnectionHandler creat... |
switch (configuration.getType()) {
case SOCKET_S2S:
return new NettyServerConnectionHandler(configuration);
case SOCKET_C2S:
return new NettyClientConnectionHandler(configuration);
case COMPONENT:
return new NettyComponentConne... | 92 | 142 | 234 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyIdleStateKeepAliveHandler.java | NettyIdleStateKeepAliveHandler | sendPingPacket | class NettyIdleStateKeepAliveHandler extends ChannelDuplexHandler {
private final boolean clientConnection;
private static final Logger Log = LoggerFactory.getLogger(NettyIdleStateKeepAliveHandler.class);
public NettyIdleStateKeepAliveHandler(boolean clientConnection) {
this.clientConnection = cli... |
NettyConnection connection = channel.attr(CONNECTION).get();
JID entity = connection.getSession() == null ? null : connection.getSession().getAddress();
if (entity != null) {
// Ping the connection to see if it is alive.
final IQ pingRequest = new IQ(IQ.Type.get);
... | 593 | 304 | 897 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyMultiplexerConnectionHandler.java | NettyMultiplexerConnectionHandler | createNettyConnection | class NettyMultiplexerConnectionHandler extends NettyConnectionHandler {
/**
* Enable / disable backup delivery of stanzas to other connections in the same connection manager when a stanza
* failed to be delivered on a multiplexer (connection manager) connection. When disabled, stanzas that can not
... |
final PacketDeliverer backupDeliverer = BACKUP_PACKET_DELIVERY_ENABLED.getValue() ? new MultiplexerPacketDeliverer() : null;
return new NettyConnection(ctx, backupDeliverer, configuration);
| 387 | 66 | 453 | <methods>public void channelRead0(ChannelHandlerContext, java.lang.String) ,public void channelUnregistered(ChannelHandlerContext) throws java.lang.Exception,public void exceptionCaught(ChannelHandlerContext, java.lang.Throwable) ,public abstract java.time.Duration getMaxIdleTime() ,public void handlerAdded(ChannelHand... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyServerConnectionHandler.java | NettyServerConnectionHandler | toString | class NettyServerConnectionHandler extends NettyConnectionHandler
{
private static final Logger Log = LoggerFactory.getLogger(NettyServerConnectionHandler.class);
/**
* Enable / disable backup delivery of stanzas to the XMPP server itself when a stanza failed to be delivered on a
* server-to-server c... |
return "NettyServerConnectionHandler{" +
"directTLS=" + directTLS +
", sslInitDone=" + sslInitDone +
", configuration=" + configuration +
'}';
| 500 | 56 | 556 | <methods>public void channelRead0(ChannelHandlerContext, java.lang.String) ,public void channelUnregistered(ChannelHandlerContext) throws java.lang.Exception,public void exceptionCaught(ChannelHandlerContext, java.lang.Throwable) ,public abstract java.time.Duration getMaxIdleTime() ,public void handlerAdded(ChannelHand... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyXMPPDecoder.java | NettyXMPPDecoder | decode | class NettyXMPPDecoder extends ByteToMessageDecoder {
private static final Logger Log = LoggerFactory.getLogger(NettyXMPPDecoder.class);
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {<FILL_FUNCTION_BODY>}
@Override
public void exceptionC... |
// Get the XML parser from the channel
XMLLightweightParser parser = ctx.channel().attr(NettyConnectionHandler.XML_PARSER).get();
// Check that the stanza constructed by the parser is not bigger than 1 Megabyte. For security reasons
// we will abort parsing when 1 Mega of queued chars ... | 198 | 369 | 567 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/nio/OfflinePacketDeliverer.java | OfflinePacketDeliverer | deliver | class OfflinePacketDeliverer implements PacketDeliverer {
private static final Logger Log = LoggerFactory.getLogger(OfflinePacketDeliverer.class);
private OfflineMessageStrategy messageStrategy;
public OfflinePacketDeliverer() {
this.messageStrategy = XMPPServer.getInstance().getOfflineMessageStr... |
if (packet instanceof Message) {
messageStrategy.storeOffline((Message) packet);
}
else if (packet instanceof Presence) {
// presence packets are dropped silently
}
else if (packet instanceof IQ) {
// IQ packets are logged before bein... | 130 | 112 | 242 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PendingSubscriptionsCommand.java | PendingSubscriptionsCommand | hasPermission | class PendingSubscriptionsCommand extends AdHocCommand {
private PubSubService service;
public PendingSubscriptionsCommand(PubSubService service) {
this.service = service;
}
@Override
protected void addStageInformation(@Nonnull final SessionData data, Element command) {
final Loca... |
// User has permission if he is an owner of at least one node or is a sysadmin
for (Node node : service.getNodes()) {
if (!node.isCollectionNode() && node.isAdmin(requester)) {
return true;
}
}
return false;
| 1,057 | 73 | 1,130 | <methods>public void <init>() ,public void addNextStageInformation(org.jivesoftware.openfire.commands.SessionData, Element) ,public void addPreviousStageInformation(org.jivesoftware.openfire.commands.SessionData, Element) ,public abstract void execute(org.jivesoftware.openfire.commands.SessionData, Element) ,public abs... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubPersistenceProviderManager.java | PubSubPersistenceProviderManager | initProvider | class PubSubPersistenceProviderManager
{
public static final SystemProperty<Class> PROVIDER = SystemProperty.Builder.ofType(Class.class)
.setKey("provider.pubsub-persistence.className")
.setBaseClass(PubSubPersistenceProvider.class)
.setDynamic(false)
.build();
private static fi... |
Class clazz = PROVIDER.getValue();
if ( clazz == null ) {
if ( ClusterManager.isClusteringEnabled() ) {
Log.debug("Clustering is enabled. Falling back to non-cached provider");
clazz = DefaultPubSubPersistenceProvider.class;
} else {
... | 299 | 271 | 570 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/AffiliationTask.java | AffiliationTask | toString | class AffiliationTask extends NodeTask
{
private static final Logger log = LoggerFactory.getLogger(AffiliationTask.class);
/**
* Address of the entity that needs an update to the affiliation with a pubsub node.
*/
private JID jid;
/**
* The new pubsub node affiliation of an entity.
... |
return getClass().getSimpleName() + " [(service=" + serviceId + "), (nodeId=" + nodeId +
"), (JID=" + jid + "),(affiliation=" + affiliation + ")]";
| 979 | 61 | 1,040 | <methods>public java.lang.String getNodeId() ,public Optional<org.jivesoftware.openfire.pubsub.Node> getNodeIfLoaded() ,public java.lang.Void getResult() ,public Optional<org.jivesoftware.openfire.pubsub.PubSubService> getServiceIfLoaded() ,public org.jivesoftware.openfire.pubsub.Node.UniqueIdentifier getUniqueNodeIden... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/CancelSubscriptionTask.java | CancelSubscriptionTask | run | class CancelSubscriptionTask extends SubscriptionTask
{
private static final Logger log = LoggerFactory.getLogger(CancelSubscriptionTask.class);
/**
* This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise.
*/
public CancelSubscriptionTask()... |
// Note: this implementation should apply changes in-memory state only. It explicitly needs not update
// persisted data storage, as this can be expected to be done by the cluster node that issued this task.
// Applying such changes in this task would, at best, needlessly require resources.
... | 183 | 331 | 514 | <methods>public void <init>() ,public void <init>(org.jivesoftware.openfire.pubsub.NodeSubscription) ,public JID getOwner() ,public org.jivesoftware.openfire.pubsub.NodeSubscription.State getState() ,public JID getSubscriberJid() ,public java.lang.String getSubscriptionId() ,public Optional<org.jivesoftware.openfire.pu... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/FlushTask.java | FlushTask | readExternal | class FlushTask implements ClusterTask<Void>
{
/**
* The unique identifier for the pubsub node that is the subject of the task, in case the task is specific to one
* pubsub node. When this task should apply to all nodes, this value will be null.
*
* @see Node#getUniqueIdentifier()
*/
@N... |
if ( ExternalizableUtil.getInstance().readBoolean( in ) ) {
uniqueIdentifier = (Node.UniqueIdentifier) ExternalizableUtil.getInstance().readSerializable( in );
} else {
this.uniqueIdentifier = null;
}
| 496 | 64 | 560 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/ModifySubscriptionTask.java | ModifySubscriptionTask | run | class ModifySubscriptionTask extends SubscriptionTask
{
private static final Logger log = LoggerFactory.getLogger(ModifySubscriptionTask.class);
/**
* This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise.
*/
public ModifySubscriptionTask()... |
// Note: this implementation should apply changes in-memory state only. It explicitly needs not update
// persisted data storage, as this can be expected to be done by the cluster node that issued this task.
// Applying such changes in this task would, at best, needlessly require resources.
... | 183 | 319 | 502 | <methods>public void <init>() ,public void <init>(org.jivesoftware.openfire.pubsub.NodeSubscription) ,public JID getOwner() ,public org.jivesoftware.openfire.pubsub.NodeSubscription.State getState() ,public JID getSubscriberJid() ,public java.lang.String getSubscriptionId() ,public Optional<org.jivesoftware.openfire.pu... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/NewSubscriptionTask.java | NewSubscriptionTask | run | class NewSubscriptionTask extends SubscriptionTask
{
private static final Logger log = LoggerFactory.getLogger(NewSubscriptionTask.class);
/**
* This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise.
*/
public NewSubscriptionTask()
{
... |
// Note: this implementation should apply changes in-memory state only. It explicitly needs not update
// persisted data storage, as this can be expected to be done by the cluster node that issued this task.
// Applying such changes in this task would, at best, needlessly require resources.
... | 177 | 545 | 722 | <methods>public void <init>() ,public void <init>(org.jivesoftware.openfire.pubsub.NodeSubscription) ,public JID getOwner() ,public org.jivesoftware.openfire.pubsub.NodeSubscription.State getState() ,public JID getSubscriberJid() ,public java.lang.String getSubscriptionId() ,public Optional<org.jivesoftware.openfire.pu... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/NodeTask.java | NodeTask | getServiceIfLoaded | class NodeTask implements ClusterTask<Void>
{
/**
* The unique identifier for the pubsub node that is the subject of the task.
*
* This value is a combination of the data that's captured in {@link #nodeId} and {@link #serviceId}, which are
* primarily retained in the API for backwards compatibil... |
if (XMPPServer.getInstance().getPubSubModule().getServiceID().equals(serviceId)) {
return Optional.of(XMPPServer.getInstance().getPubSubModule());
}
else
{
PEPServiceManager serviceMgr = XMPPServer.getInstance().getIQPEPHandler().getServiceManager();
... | 1,332 | 136 | 1,468 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/RefreshNodeTask.java | RefreshNodeTask | run | class RefreshNodeTask extends NodeTask
{
private static final Logger log = LoggerFactory.getLogger(RefreshNodeTask.class);
/**
* This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise.
*/
public RefreshNodeTask()
{
}
/**
* ... |
// Note: this implementation should apply changes in-memory state only. It explicitly needs not update
// persisted data storage, as this can be expected to be done by the cluster node that issued this task.
// Applying such changes in this task would, at best, needlessly require resources.
... | 175 | 272 | 447 | <methods>public java.lang.String getNodeId() ,public Optional<org.jivesoftware.openfire.pubsub.Node> getNodeIfLoaded() ,public java.lang.Void getResult() ,public Optional<org.jivesoftware.openfire.pubsub.PubSubService> getServiceIfLoaded() ,public org.jivesoftware.openfire.pubsub.Node.UniqueIdentifier getUniqueNodeIden... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/RemoveNodeTask.java | RemoveNodeTask | run | class RemoveNodeTask extends NodeTask
{
private static final Logger log = LoggerFactory.getLogger(RemoveNodeTask.class);
/**
* This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise.
*/
public RemoveNodeTask()
{
}
/**
* Con... |
log.debug("[TASK] Removing node - nodeID: {}", getNodeId());
final Optional<PubSubService> optService = getServiceIfLoaded();
// This will only occur if a PEP service is not loaded on this particular cluster node. We can safely do nothing
// in this case since any changes that might h... | 173 | 175 | 348 | <methods>public java.lang.String getNodeId() ,public Optional<org.jivesoftware.openfire.pubsub.Node> getNodeIfLoaded() ,public java.lang.Void getResult() ,public Optional<org.jivesoftware.openfire.pubsub.PubSubService> getServiceIfLoaded() ,public org.jivesoftware.openfire.pubsub.Node.UniqueIdentifier getUniqueNodeIden... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/SubscriptionTask.java | SubscriptionTask | toString | class SubscriptionTask extends NodeTask
{
/**
* The ID that uniquely identifies the subscription of the user in the node.
*
* @see NodeSubscription#getID()
*/
private String subId;
/**
* The address of the entity that owns this subscription.
*
* @see NodeSubscription#getO... |
return getClass().getSimpleName() + " [(service=" + serviceId + "), (nodeId=" + nodeId + "), (owner=" + owner
+ "),(subscriber=" + subJid + "),(state=" + state + "),(id=" + subId + ")]";
| 1,093 | 78 | 1,171 | <methods>public java.lang.String getNodeId() ,public Optional<org.jivesoftware.openfire.pubsub.Node> getNodeIfLoaded() ,public java.lang.Void getResult() ,public Optional<org.jivesoftware.openfire.pubsub.PubSubService> getServiceIfLoaded() ,public org.jivesoftware.openfire.pubsub.Node.UniqueIdentifier getUniqueNodeIden... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/AccessModel.java | AccessModel | valueOf | class AccessModel implements Serializable {
public static final AccessModel whitelist = new WhitelistAccess();
public static final AccessModel open = new OpenAccess();
public static final AccessModel authorize = new AuthorizeAccess();
public static final AccessModel presence = new PresenceAccess();
... |
if ("open".equals(name)) {
return open;
}
else if ("whitelist".equals(name)) {
return whitelist;
}
else if ("authorize".equals(name)) {
return authorize;
}
else if ("presence".equals(name)) {
return presence;
... | 731 | 127 | 858 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/AuthorizeAccess.java | AuthorizeAccess | canAccessItems | class AuthorizeAccess extends AccessModel {
AuthorizeAccess() {
}
@Override
public boolean canSubscribe(Node node, JID owner, JID subscriber) {
return true;
}
@Override
public boolean canAccessItems(Node node, JID owner, JID subscriber) {<FILL_FUNCTION_BODY>}
@Override
pu... |
// Let node owners and sysadmins always get node items
if (node.isAdmin(owner)) {
return true;
}
NodeAffiliate nodeAffiliate = node.getAffiliate(owner);
if (nodeAffiliate == null) {
// This is an unknown entity to the node so deny access
retu... | 234 | 177 | 411 | <methods>public non-sealed void <init>() ,public abstract boolean canAccessItems(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract boolean canSubscribe(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract java.lang.String getName() ,public abstract PacketError.Condition getSubsriptionError(... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/OnlyPublishers.java | OnlyPublishers | canPublish | class OnlyPublishers extends PublisherModel {
@Override
public boolean canPublish(Node node, JID entity) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "publishers";
}
} |
NodeAffiliate nodeAffiliate = node.getAffiliate(entity);
return nodeAffiliate != null && (
nodeAffiliate.getAffiliation() == NodeAffiliate.Affiliation.publisher ||
nodeAffiliate.getAffiliation() == NodeAffiliate.Affiliation.owner);
| 68 | 92 | 160 | <methods>public non-sealed void <init>() ,public abstract boolean canPublish(org.jivesoftware.openfire.pubsub.Node, JID) ,public abstract java.lang.String getName() ,public static org.jivesoftware.openfire.pubsub.models.PublisherModel valueOf(java.lang.String) <variables>public static final org.jivesoftware.openfire.pu... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/OnlySubscribers.java | OnlySubscribers | canPublish | class OnlySubscribers extends PublisherModel {
@Override
public boolean canPublish(Node node, JID entity) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "subscribers";
}
} |
NodeAffiliate nodeAffiliate = node.getAffiliate(entity);
// Deny access if user does not have any relation with the node or is an outcast
if (nodeAffiliate == null ||
nodeAffiliate.getAffiliation() == NodeAffiliate.Affiliation.outcast) {
return false;
}
... | 72 | 233 | 305 | <methods>public non-sealed void <init>() ,public abstract boolean canPublish(org.jivesoftware.openfire.pubsub.Node, JID) ,public abstract java.lang.String getName() ,public static org.jivesoftware.openfire.pubsub.models.PublisherModel valueOf(java.lang.String) <variables>public static final org.jivesoftware.openfire.pu... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/PresenceAccess.java | PresenceAccess | canSubscribe | class PresenceAccess extends AccessModel {
private static final Logger Log = LoggerFactory.getLogger(PresenceAccess.class);
PresenceAccess() {
}
@Override
public boolean canSubscribe(Node node, JID owner, JID subscriber) {<FILL_FUNCTION_BODY>}
@Override
public boolean canAccessItems(Node... |
// Let node owners and sysadmins always subcribe to the node
if (node.isAdmin(owner)) {
return true;
}
XMPPServer server = XMPPServer.getInstance();
for (JID nodeOwner : node.getOwners()) {
// Give access to the owner of the roster :)
if (node... | 268 | 318 | 586 | <methods>public non-sealed void <init>() ,public abstract boolean canAccessItems(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract boolean canSubscribe(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract java.lang.String getName() ,public abstract PacketError.Condition getSubsriptionError(... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/PublisherModel.java | PublisherModel | valueOf | class PublisherModel implements Serializable {
public final static PublisherModel open = new OpenPublisher();
public final static PublisherModel publishers = new OnlyPublishers();
public final static PublisherModel subscribers = new OnlySubscribers();
/**
* Returns the specific subclass of Publis... |
if ("open".equals(name)) {
return open;
}
else if ("publishers".equals(name)) {
return publishers;
}
else if ("subscribers".equals(name)) {
return subscribers;
}
throw new IllegalArgumentException("Unknown publisher model: " + ... | 338 | 83 | 421 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/RosterAccess.java | RosterAccess | canSubscribe | class RosterAccess extends AccessModel {
private static final Logger Log = LoggerFactory.getLogger(RosterAccess.class);
RosterAccess() {
}
@Override
public boolean canSubscribe(Node node, JID owner, JID subscriber) {<FILL_FUNCTION_BODY>}
@Override
public boolean canAccessItems(Node node,... |
// Let node owners and sysadmins always subscribe to the node
if (node.isAdmin(owner)) {
return true;
}
for (JID nodeOwner : node.getOwners()) {
if (nodeOwner.equals(owner)) {
return true;
}
}
// Check that the subscrib... | 269 | 304 | 573 | <methods>public non-sealed void <init>() ,public abstract boolean canAccessItems(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract boolean canSubscribe(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract java.lang.String getName() ,public abstract PacketError.Condition getSubsriptionError(... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/WhitelistAccess.java | WhitelistAccess | canSubscribe | class WhitelistAccess extends AccessModel {
WhitelistAccess() {
}
@Override
public boolean canSubscribe(Node node, JID owner, JID subscriber) {<FILL_FUNCTION_BODY>}
@Override
public boolean canAccessItems(Node node, JID owner, JID subscriber) {
return canSubscribe(node, owner, subscri... |
// Let node owners and sysadmins always subcribe to the node
if (node.isAdmin(owner)) {
return true;
}
// User is in the whitelist if he has an affiliation and it is not of type outcast
NodeAffiliate nodeAffiliate = node.getAffiliate(owner);
return nodeAffili... | 244 | 127 | 371 | <methods>public non-sealed void <init>() ,public abstract boolean canAccessItems(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract boolean canSubscribe(org.jivesoftware.openfire.pubsub.Node, JID, JID) ,public abstract java.lang.String getName() ,public abstract PacketError.Condition getSubsriptionError(... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/roster/RosterEventDispatcher.java | RosterEventDispatcher | rosterLoaded | class RosterEventDispatcher {
private static final Logger Log = LoggerFactory.getLogger(RosterEventDispatcher.class);
private static List<RosterEventListener> listeners =
new CopyOnWriteArrayList<>();
/**
* Registers a listener to receive events.
*
* @param listener the list... |
if (!listeners.isEmpty()) {
for (RosterEventListener listener : listeners) {
try {
listener.rosterLoaded(roster);
} catch (Exception e) {
Log.warn("An exception occurred while dispatching a 'rosterLoaded' event!", e);
... | 1,007 | 84 | 1,091 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/sasl/AnonymousSaslServer.java | AnonymousSaslServer | getNegotiatedProperty | class AnonymousSaslServer implements SaslServer
{
public static final SystemProperty<Boolean> ENABLED = SystemProperty.Builder.ofType(Boolean.class)
.setKey("xmpp.auth.anonymous")
.setDefaultValue(Boolean.FALSE)
.setDynamic(Boolean.TRUE)
.build();
public static final String NAME... |
if ( !isComplete() )
{
throw new IllegalStateException( "Authentication exchange not completed." );
}
if ( propName.equals( Sasl.QOP ) )
{
return "auth";
}
else
{
return null;
}
| 740 | 77 | 817 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/sasl/ExternalClientSaslServer.java | ExternalClientSaslServer | evaluateResponse | class ExternalClientSaslServer implements SaslServer
{
public static final SystemProperty<Boolean> PROPERTY_SASL_EXTERNAL_CLIENT_SUPPRESS_MATCHING_REALMNAME = SystemProperty.Builder
.ofType( Boolean.class )
.setKey( "xmpp.auth.sasl.external.client.suppress-matching-realmname" )
.setDefaultVa... |
if ( isComplete() )
{
throw new IllegalStateException( "Authentication exchange already completed." );
}
if (response.length == 0 && session.getSessionData(SASLAuthentication.SASL_LAST_RESPONSE_WAS_PROVIDED_BUT_EMPTY) != null) {
// No initial response. Send a ch... | 716 | 1,189 | 1,905 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/sasl/ExternalServerSaslServer.java | ExternalServerSaslServer | evaluateResponse | class ExternalServerSaslServer implements SaslServer
{
private static final Logger Log = LoggerFactory.getLogger(ExternalServerSaslServer.class);
/**
* This property controls if the inbound connection is required to provide an authorization identity in the SASL
* EXTERNAL handshake (as part of an `au... |
if ( isComplete() )
{
throw new IllegalStateException( "Authentication exchange already completed." );
}
// The value as sent to us in the 'from' attribute of the stream element sent by the remote server.
final String defaultIdentity = session.getDefaultIdentity();
... | 847 | 761 | 1,608 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/sasl/JiveSharedSecretSaslServer.java | JiveSharedSecretSaslServer | getNegotiatedProperty | class JiveSharedSecretSaslServer implements SaslServer
{
public static final String NAME = "JIVE-SHAREDSECRET";
private boolean complete = false;
@Override
public String getMechanismName()
{
return NAME;
}
@Override
public byte[] evaluateResponse( byte[] response ) throws Sasl... |
if ( !isComplete() )
{
throw new IllegalStateException( "Authentication exchange not completed." );
}
if ( propName.equals( Sasl.QOP ) )
{
return "auth";
}
else
{
return null;
}
| 1,280 | 77 | 1,357 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/sasl/SaslServerFactoryImpl.java | SaslServerFactoryImpl | createSaslServer | class SaslServerFactoryImpl implements SaslServerFactory
{
private final static Logger Log = LoggerFactory.getLogger( SaslServerFactoryImpl.class );
/**
* All mechanisms provided by this factory.
*/
private final Set<Mechanism> allMechanisms;
public SaslServerFactoryImpl()
{
allM... |
if ( !Arrays.asList( getMechanismNames( props )).contains( mechanism ) )
{
Log.debug( "This implementation is unable to create a SaslServer instance for the {} mechanism using the provided properties.", mechanism );
return null;
}
switch ( mechanism.toUpperCase(... | 713 | 613 | 1,326 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/sasl/SaslServerPlainImpl.java | SaslServerPlainImpl | evaluateResponse | class SaslServerPlainImpl implements SaslServer {
/**
* Authentication identity (identity whose password will be used).
*/
private String authcid;
/**
* Authorization identity (identity to act as). Derived from principal if not specifically set by the peer.
*/
private String authzi... |
if (completed) {
throw new IllegalStateException("PLAIN authentication already completed");
}
if (aborted) {
throw new IllegalStateException("PLAIN authentication previously aborted due to error");
}
try {
if(response.length != 0) {
... | 1,402 | 581 | 1,983 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/sasl/VerifyPasswordCallback.java | VerifyPasswordCallback | clearPassword | class VerifyPasswordCallback implements Callback, Serializable {
private static final long serialVersionUID = -6393402725550707836L;
private char[] password;
private boolean verified;
/**
* Construct a <code>VerifyPasswordCallback</code>.
* @param password the password to verify.
*/
... |
if (password != null) {
Arrays.fill(password, ' ');
password = null;
}
| 340 | 34 | 374 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/security/SecurityAuditManager.java | SecurityAuditManagerContainer | getEvents | class SecurityAuditManagerContainer {
private static SecurityAuditManager instance = new SecurityAuditManager();
}
/**
* Returns the currently-installed SecurityAuditProvider. <b>Warning:</b> in virtually all
* cases the security audit provider should not be used directly. Instead, the approp... |
if (provider.isWriteOnly()) {
throw new AuditWriteOnlyException();
}
return provider.getEvents(username, skipEvents, numEvents, startTime, endTime);
| 854 | 49 | 903 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/server/OutgoingServerSocketReader.java | OutgoingServerSocketReader | init | class OutgoingServerSocketReader {
private static final Logger Log = LoggerFactory.getLogger(OutgoingServerSocketReader.class);
private OutgoingServerSession session;
private boolean open = true;
private XMPPPacketReader reader = null;
/**
* Queue that holds the elements read by the XMPPPacke... |
// Create a thread that will read and store DOM Elements.
Thread thread = new Thread("Outgoing Server Reader") {
@Override
public void run() {
while (open) {
Element doc;
try {
doc = reader.parseDocu... | 592 | 348 | 940 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/server/RemoteServerConfiguration.java | RemoteServerConfiguration | getCachedSize | class RemoteServerConfiguration implements Cacheable, Externalizable {
private String domain;
private Permission permission;
private int remotePort;
public RemoteServerConfiguration() {
}
public RemoteServerConfiguration(String domain) {
this.domain = domain;
}
public Strin... |
// Approximate the size of the object in bytes by calculating the size
// of each field.
int size = 0;
size += CacheSizes.sizeOfObject(); // overhead of object
size += CacheSizes.sizeOfString(domain); // domain
size += CacheSizes.sizeOfInt(); ... | 477 | 89 | 566 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/server/ServerDialbackErrorException.java | ServerDialbackErrorException | toXML | class ServerDialbackErrorException extends Exception
{
private final String from;
private final String to;
private final PacketError error;
public ServerDialbackErrorException(String from, String to, PacketError error)
{
super();
this.from = from;
this.to = to;
this.... |
final Namespace ns = Namespace.get("db", "jabber:server:dialback");
final Document outbound = DocumentHelper.createDocument();
final Element root = outbound.addElement("root");
root.add(ns);
final Element result = root.addElement(QName.get("result", ns));
result.addAttri... | 238 | 133 | 371 | <methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/server/ServerDialbackKeyInvalidException.java | ServerDialbackKeyInvalidException | toXML | class ServerDialbackKeyInvalidException extends Exception
{
private final String from;
private final String to;
public ServerDialbackKeyInvalidException(String from, String to)
{
super();
this.from = from;
this.to = to;
}
public String getFrom()
{
return fro... |
final Namespace ns = Namespace.get("db", "jabber:server:dialback");
final Document outbound = DocumentHelper.createDocument();
final Element root = outbound.addElement("root");
root.add(ns);
final Element result = root.addElement(QName.get("result", ns));
result.addAttri... | 132 | 123 | 255 | <methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/session/ClientSessionInfo.java | ClientSessionInfo | readExternal | class ClientSessionInfo implements Externalizable {
private Presence presence;
private String defaultList;
private String activeList;
private boolean offlineFloodStopped;
private boolean messageCarbonsEnabled;
private boolean hasRequestedBlocklist;
private NodeID nodeID;
private boolean ... |
Element packetElement = (Element) ExternalizableUtil.getInstance().readSerializable(in);
presence = new Presence(packetElement, true);
if (ExternalizableUtil.getInstance().readBoolean(in)) {
defaultList = ExternalizableUtil.getInstance().readSafeUTF(in);
}
if (Extern... | 693 | 211 | 904 | <no_super_class> |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/session/ClientSessionTask.java | ClientSessionTask | run | class ClientSessionTask extends RemoteSessionTask {
private static Logger logger = LoggerFactory.getLogger(ClientSessionTask.class);
private JID address;
private transient Session session;
public ClientSessionTask() {
super();
}
public ClientSessionTask(JID address, Operation operati... |
if (getSession() == null || getSession().isClosed()) {
logger.error("Session not found for JID: " + address);
return;
}
super.run();
ClientSession session = (ClientSession) getSession();
if (session instanceof RemoteClientSession) {
// The se... | 298 | 462 | 760 | <methods>public void <init>() ,public java.lang.Object getResult() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public void run() ,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>private static final Logger Log,protected... |
igniterealtime_Openfire | Openfire/xmppserver/src/main/java/org/jivesoftware/openfire/session/ComponentSessionTask.java | ComponentSessionTask | run | class ComponentSessionTask extends RemoteSessionTask {
private JID address;
public ComponentSessionTask() {
}
protected ComponentSessionTask(JID address, Operation operation) {
super(operation);
this.address = address;
}
Session getSession() {
return SessionManager.get... |
super.run();
if (operation == Operation.getType) {
result = ((ComponentSession) getSession()).getExternalComponent().getType();
}
else if (operation == Operation.getCategory) {
result = ((ComponentSession) getSession()).getExternalComponent().getCategory();
... | 242 | 280 | 522 | <methods>public void <init>() ,public java.lang.Object getResult() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public void run() ,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>private static final Logger Log,protected... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.