code
stringlengths
73
34.1k
label
stringclasses
1 value
private final JsMessage createSpecialisedMessage(JsMsgObject jmo) { JsMessage message = null; /* For an API message, we need to return an instance of the appropriate */ /* specialisation. */ if (jmo.getChoiceField(JsHdrAccess.API) == JsHdrAccess...
java
private int bytesToInt(byte[] bytes) { int result = -1; if (bytes.length >= 4) { result = ((bytes[0]&0xff) << 24) + ((bytes[1]&0xff) << 16) + ((bytes[2]&0xff) << 8) + (bytes[3]&0xff); } return result; ...
java
private String getTopic(ServiceEvent serviceEvent) { StringBuilder topic = new StringBuilder(SERVICE_EVENT_TOPIC_PREFIX); switch (serviceEvent.getType()) { case ServiceEvent.REGISTERED: topic.append("REGISTERED"); break; case ServiceEvent.MODIFIED...
java
public synchronized void updateFilters(NotificationFilter[] filtersArray) { filters.clear(); if (filtersArray != null) Collections.addAll(filters, filtersArray); }
java
@Override public synchronized boolean isNotificationEnabled(Notification notification) { if (filters.isEmpty()) { //Allow all return true; } final Iterator<NotificationFilter> i = filters.iterator(); while (i.hasNext()) { if (i.next().isNotificati...
java
public Boolean getApplicationExceptionRollback(Throwable t) // F743-14982 { Class<?> klass = t.getClass(); ApplicationException ae = getApplicationException(klass); Boolean rollback = null; if (ae != null) { rollback = ae.rollback(); } // Prior to...
java
private ApplicationException getApplicationException(Class<?> klass) // F743-14982 { ApplicationException result = null; if (ivApplicationExceptionMap != null) { result = ivApplicationExceptionMap.get(klass.getName()); if (TraceComponent.isAnyTracingEnabled() && tc.is...
java
@Override public ComponentMetaData[] getComponentMetaDatas() { ComponentMetaData[] initializedComponentMetaDatas = null; synchronized (ivEJBApplicationMetaData) { initializedComponentMetaDatas = new ComponentMetaData[ivNumFullyInitializedBeans]; int i = 0; ...
java
public String toDumpString() { // Get the New Line separator from the Java system property. String newLine = AccessController.doPrivileged(new SystemGetPropertyPrivileged("line.separator", "\n")); StringBuilder sb = new StringBuilder(toString()); String indent = " "; sb.app...
java
public void addApplicationEventListener(EJBApplicationEventListener listener) // F743-26072 { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, "addApplicationEventListener: " + listener); if (ivApplicationEventLis...
java
public void addAutomaticTimerBean(AutomaticTimerBean timerBean) // d604213 { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "addAutomaticTimerBean: " + timerBean.getBeanMetaData().j2eeName); if (ivAutomaticTimerBeans == null) { ivAutoma...
java
public void freeResourcesAfterAllBeansInitialized(BeanMetaData bmd) { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "freeResourcesAfterAllBeansInitialized: " + bmd.j2eeName + ", " + (ivNumFullyI...
java
@Override public void setVersionedModuleBaseName(String appBaseName, String modBaseName) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "ModuleName = " + ivName + ", VersionedBaseName = " + appBaseName + "#" + modBaseName); i...
java
private void addElement(String value) { if (null == value) { return; } this.num_items++; this.genericValues.add(value); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "addElement: " + value + " num: " + this.num_items); ...
java
private void addElement(String key, String value) { this.num_items++; List<String> vals = this.values.get(key); if (null == vals) { vals = new LinkedList<String>(); } if (null == value) { vals.add("\"\""); } else { vals.add(value); ...
java
private void parse(String input) { char[] data = input.toCharArray(); int start = 0; int hard_stop = data.length - 1; while (start < data.length) { if (this.mySep == data[start]) { start++; continue; } // look for the '=...
java
private String extractString(char[] data, int start, int end) { // skip leading whitespace and quotes while (start < end && (' ' == data[start] || '\t' == data[start] || '"' == data[start])) { start++; } // ignore trailing whitespace and quotes while (e...
java
public boolean add(String inputValue) { String value = Normalizer.normalize(inputValue, Normalizer.NORMALIZE_LOWER); if (!contains(this.genericValues, value)) { addElement(value); return true; } return false; }
java
public boolean add(String inputKey, String inputValue) { String key = Normalizer.normalize(inputKey, Normalizer.NORMALIZE_LOWER); String value = Normalizer.normalize(inputValue, Normalizer.NORMALIZE_LOWER); if (!contains(this.values.get(key), value)) { addElement(key, value); ...
java
private boolean remove(List<String> list, String item) { if (null != list) { if (list.remove(item)) { this.num_items--; return true; } } return false; }
java
public boolean remove(String inputKey, String inputValue) { String key = Normalizer.normalize(inputKey, Normalizer.NORMALIZE_LOWER); String value = Normalizer.normalize(inputValue, Normalizer.NORMALIZE_LOWER); boolean rc = remove(this.values.get(key), value); if (TraceComponent.isAnyTrac...
java
public boolean remove(String inputValue) { String value = Normalizer.normalize(inputValue, Normalizer.NORMALIZE_LOWER); boolean rc = remove(this.genericValues, value); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "remove: " + value + " rc=" + rc); ...
java
public int removeKey(String inputKey) { String key = Normalizer.normalize(inputKey, Normalizer.NORMALIZE_LOWER); int num_removed = 0; List<String> vals = this.values.remove(key); if (null != vals) { num_removed = vals.size(); } this.num_items -= num_removed; ...
java
private boolean contains(List<String> list, String item) { return (null == list) ? false : list.contains(item); }
java
public boolean containsKey(String inputKey) { String key = Normalizer.normalize(inputKey, Normalizer.NORMALIZE_LOWER); List<String> list = this.values.get(key); boolean rc = (null == list) ? false : !list.isEmpty(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { ...
java
public Iterator<String> getValues(String inputKey) { String key = Normalizer.normalize(inputKey, Normalizer.NORMALIZE_LOWER); List<String> vals = this.values.get(key); if (null != vals) { return vals.iterator(); } return new LinkedList<String>().iterator(); }
java
public String marshall() { if (0 == this.num_items) { return ""; } boolean shouldPrepend = false; StringBuilder output = new StringBuilder(10 * this.num_items); // walk through the list of simple values (no key=value) first Iterator<String> i = this.genericVal...
java
public void clear() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Clearing this header handler: " + this); } this.num_items = 0; this.values.clear(); this.genericValues.clear(); }
java
protected void proddle() throws SIConnectionDroppedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "proddle"); boolean useThisThread = false; synchronized (priorityQueue) { synchronized (this) { if (idle) { useThi...
java
public void complete(NetworkConnection vc, IOWriteRequestContext wctx) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "complete", new Object[] {vc, wctx}); if (connection.isLoggingIOEvents()) connection.getConnectionEventRecorder().logDebug("complete method invoked ...
java
private void doWork(boolean hasWritten) throws SIConnectionDroppedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "doWork", Boolean.valueOf(hasWritten)); final BlockingQueue<Pair<SendListener,Conversation>> readySendCallbacks = new LinkedBlock...
java
private void notifyReadySendListeners(BlockingQueue<Pair<SendListener, Conversation>> readySendCallbacks) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "notifyReadySendListeners", readySendCallbacks); try { for (Pair<SendListener, Conversation> callback : ...
java
private boolean switchToIdle() throws SIConnectionDroppedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "switchToIdle"); final boolean noMoreWork; synchronized (priorityQueue) { synchronized (this) { noMoreWork = !isWorkAvailable...
java
private WsByteBuffer getWriteContextBuffer() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getWriteContextBuffer"); WsByteBuffer writeBuffer = getSoleWriteContextBuffer(); if (firstInvocation.compareAndSet(true, false) || (writeBuffer == null)) { f...
java
private WsByteBuffer getSoleWriteContextBuffer() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getSoleWriteContextBuffer"); WsByteBuffer writeBuffer = null; final WsByteBuffer[] writeBuffers = writeCtx.getBuffers(); if (writeBuffers != null) { ...
java
protected void physicalCloseNotification() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "physicalCloseNotification"); synchronized(connectionClosedLock) { connectionClosed = true; } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled...
java
private boolean isWorkAvailable() throws SIConnectionDroppedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "isWorkAvailable"); final boolean isWork; if (terminate) { isWork = false; } else { isWork = (partiallySentTransmission...
java
public static boolean addWarToServer( LibertyServer targetServer, String targetDir, String warName, String[] warPackageNames, boolean addWarResources) throws Exception { String earName = null; boolean addEarResources = DO_NOT_ADD_RESOURCES; String jarName = null; boolea...
java
public static boolean addToServer( LibertyServer targetServer, String targetDir, String earName, boolean addEarResources, String warName, String[] warPackageNames, boolean addWarResources, String jarName, String[] jarPackageNames, boolean addJarResources) throws Exception { if (...
java
public boolean couldContainAnnotationsOnClassDef(DataInput in, Set<String> byteCodeAnnotationsNames) throws IOException { /* According to Java VM Spec, each .class file contains * a single class or interface definition. The structure * definition is shown below: Cl...
java
public Properties getProperties() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getProperties"); return this.sslProperties; }
java
public void setProperties(Properties sslProps) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setProperties"); this.sslProperties = sslProps; }
java
public boolean getSetSignerOnThread() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getSetSignerOnThread: " + this.setSignerOnThread); return this.setSignerOnThread; }
java
public boolean getAutoAcceptBootstrapSigner() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getAutoAcceptBootstrapSigner: " + this.autoAcceptBootstrapSigner); return this.autoAcceptBootstrapSigner; }
java
public Map<String, Object> getInboundConnectionInfo() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getInboundConnectionInfo"); return this.inboundConnectionInfo; }
java
public void setAutoAcceptBootstrapSigner(boolean flag) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setAutoAcceptBootstrapSigner -> " + flag); this.autoAcceptBootstrapSigner = flag; }
java
public boolean getAutoAcceptBootstrapSignerWithoutStorage() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getAutoAcceptBootstrapSignerWithoutStorage: " + this.autoAcceptBootstrapSignerWithoutStorage); return this.autoAcceptBootstrapSignerWithoutStorage; ...
java
public void setAutoAcceptBootstrapSignerWithoutStorage(boolean flag) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setAutoAcceptBootstrapSignerWithoutStorage -> " + flag); this.autoAcceptBootstrapSignerWithoutStorage = flag; }
java
public void setSetSignerOnThread(boolean flag) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setSetSignerOnThread: " + flag); this.setSignerOnThread = flag; }
java
public X509Certificate[] getSignerChain() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getSignerChain"); return signer == null ? null : signer.clone(); }
java
public void setSignerChain(X509Certificate[] signerChain) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setSignerChain"); this.signer = signerChain == null ? null : signerChain.clone(); }
java
public void setInboundConnectionInfo(Map<String, Object> connectionInfo) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setInboundConnectionInfo"); this.inboundConnectionInfo = connectionInfo; }
java
public Map<String, Object> getOutboundConnectionInfo() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getOutboundConnectionInfo"); return this.outboundConnectionInfo; }
java
public void setOutboundConnectionInfo(Map<String, Object> connectionInfo) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setOutboundConnectionInfo"); this.outboundConnectionInfo = connectionInfo; }
java
public Map<String, Object> getOutboundConnectionInfoInternal() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getOutboundConnectionInfoInternal"); return this.outboundConnectionInfoInternal; }
java
public void setOutboundConnectionInfoInternal(Map<String, Object> connectionInfo) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setOutboundConnectionInfoInternal :" + connectionInfo); this.outboundConnectionInfoInternal = connectionInfo; }
java
protected byte[] serializeObject(Serializable theObject) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oout = new ObjectOutputStream(baos); oout.writeObject(theObject); byte[] data = baos.toByteArray(); baos.close(); oo...
java
public void setPuName(String puName) { // re-initialize puName only if it has not been set to avoid // overriding valid relative puName defined in annotation/dd. if (ivPuName == null || ivPuName.length() == 0) // d442457 { ivPuName = puName; reComputeHashCod...
java
private void reComputeHashCode() { ivCurHashCode = (ivAppName != null ? ivAppName.hashCode() : 0) // d437828 + (ivModJarName != null ? ivModJarName.hashCode() : 0) + (ivPuName != null ? ivPuName.hashCode() : 0); }
java
public ChildChannelDataImpl createChild() { String childName = this.name + CHILD_STRING + nextChildId(); ChildChannelDataImpl child = new ChildChannelDataImpl(childName, this); this.children.add(child); return child; }
java
private static ReadableLogRecord read(ByteBuffer viewBuffer, long expectedSequenceNumber, ByteBuffer sourceBuffer) { ReadableLogRecord logRecord = null; int absolutePosition = sourceBuffer.position() + viewBuffer.position(); // Read the record magic number field. final byte[] magicNumberBuffer = ...
java
private static ReadableLogRecord doByteByByteScanning(ByteBuffer sourceBuffer, long expectedSequenceNumber) { if (tc.isEntryEnabled()) Tr.entry(tc, "doByteByByteScanning", new Object[] {sourceBuffer, new Long(expectedSequenceNumber)}); ReadableLogRecord logRecord = null; ByteBuffer viewBuffer = sour...
java
public synchronized boolean add(String key, T value) { if (key.length() > 3 && key.endsWith(WILDCARD) && key.charAt(key.length() - 2) != '.') { throw new IllegalArgumentException("Unsupported use of wildcard in key " + key); } // Find the key in the structure (build out to it) ...
java
public void compact() { // Bare-bones iterator: no filter, don't bother with package strings for (NodeIterator<T> i = this.getNodeIterator(); i.hasNext();) { NodeIndex<T> n = i.next(); if (n.node.exactKids != null) n.node.exactKids.trimToSize(); } }
java
public String dump() { StringBuilder s = new StringBuilder(); int c = 0; // we need the flavor of iterator that does build up a package string so we can // include it in the generated string s.append(nl); for (NodeIterator<T> i = this.getNodeIterator(null); i.hasNext();) ...
java
NodeIterator<T> getNodeIterator(Filter<T> filter) { return new NodeIterator<T>(root, filter, true); }
java
public void modifed(ServiceReference<ResourceFactory> ref) { String[] newInterfaces = getServiceInterfaces(ref); if (!Arrays.equals(interfaces, newInterfaces)) { unregister(); register(ref, newInterfaces); } else { registration.setProperties(getServiceProperti...
java
@Override public List<PersistenceProvider> getPersistenceProviders() { // try to get the context classloader first, if that fails, use the loader // that loaded this class ClassLoader cl = PrivClassLoader.get(null); if (cl == null) { cl = PrivClassLoader.get(HybridPersist...
java
@Override public boolean add(Object o) { ConnectorProperty connectorPropertyToAdd = (ConnectorProperty) o; String nameToAdd = connectorPropertyToAdd.getName(); ConnectorProperty connectorProperty = null; String name = null; Enumeration<Object> e = this.elements(); wh...
java
public String findConnectorPropertyString(String desiredPropertyName, String defaultValue) { String retVal = defaultValue; String name = null; ConnectorProperty property = null; Enumeration<Object> e = this.elements(); while (e.hasMoreElements()) { property = (Conn...
java
public void handleMessage(MessageItem msgItem) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "handleMessage", new Object[] { msgItem }); JsMessage jsMsg = msgItem.getMessage(); int priority = jsMsg.getPriority().intValue(); ...
java
public void handleSilence(MessageItem msgItem) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "handleSilence", new Object[] { msgItem }); JsMessage jsMsg = msgItem.getMessage(); int priority = jsMsg.getPriority().intValue(); ...
java
private void handleNewStreamID(ControlMessage cMsg) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "handleNewStreamID", new Object[] { cMsg }); handleNewStreamID(cMsg, null); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnable...
java
private void handleNewStreamID(AbstractMessage aMessage, MessageItem msgItem) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "handleNewStreamID", new Object[] { aMessage, msgItem }); SIBUuid12 streamID = aMessage.getGuaranteedStreamUUID(); ...
java
private StreamSet addNewStreamSet(SIBUuid12 streamID, SIBUuid8 sourceMEUuid, SIBUuid12 remoteDestUuid, SIBUuid8 remoteBusUuid, String linkTarget) throws SIRollbackExceptio...
java
private TargetStream createStream(StreamSet streamSet, int priority, Reliability reliability, long completedPrefix) throws SIResourceException { if (TraceComponent.isAny...
java
private TargetStream createStream(StreamSet streamSet, int priority, Reliability reliability) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "createStream", ne...
java
public void handleFlushedMessage(ControlFlushed cMsg) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "handleFlushedMessage", new Object[] { cMsg }); SIBUuid12 streamID = cMsg.getGuaranteedStreamUUID(); forceFlush(streamID); ...
java
public void forceFlush(SIBUuid12 streamID) throws SIResourceException, SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "forceFlush", new Object[] { streamID }); // Synchronize to resolve racing messages. synchronized (flushMap) { ...
java
public void requestFlushAtSource(SIBUuid8 source, SIBUuid12 destID, SIBUuid8 busID, SIBUuid12 stream, boolean indoubtDiscard) throws SIException, SIResourceException { i...
java
public void handleSilenceMessage(ControlSilence cMsg) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "handleSilenceMessage", new Object[] { cMsg }); int priority = cMsg.getPriority().intValue(); Reliability reliability = cMsg.getR...
java
public void reconstituteStreamSet(StreamSet streamSet) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "reconstituteStreamSet", streamSet); synchronized(streamSets) { streamSets.put(streamSet.getStreamID(), streamSet); sourceMap.put(streamSet.get...
java
public void alarm(Object alarmContext) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "alarm", alarmContext); // Alarm context should be an sid, make it so. SIBUuid12 sid = (SIBUuid12) alarmContext; // synchronized here in case we're racing with an ans...
java
public boolean isEmpty() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(this, tc, "isEmpty"); SibTr.exit(tc, "isEmpty", new Object[] {Boolean.valueOf(streamSets.isEmpty()), Boolean.valueOf(flushedStreamSets.isEmpty()),streamSets, this}); } // D...
java
public void queryUnflushedStreams() throws SIResourceException { synchronized (streamSets) { for(Iterator i=streamSets.iterator(); i.hasNext();) { StreamSet next = (StreamSet) i.next(); // Note the use of -1 for the request ID. This guarantees // that we won't accidentall...
java
private boolean validateAutomaticTimer(BeanMetaData bmd) { if (bmd.timedMethodInfos == null || methodId > bmd.timedMethodInfos.length) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "validateAutomaticTimer: ivMethodId=" + methodId ...
java
private void writeObject(ObjectOutputStream out) throws IOException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "writeObject: " + this); // Use v1 unless features are present that require v2. int versi...
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "readObject"); in.defaultReadObject(); // Read in eye catcher. ...
java
protected BeanMetaData getBeanMetaData() { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "getBeanMetaData: " + this); EJSHome home; try { // Get the currently installed and active home for thi...
java
private static byte[] serializeObject(Object obj) { if (obj == null) { return null; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(obj); out.flush()...
java
protected boolean maxRequestsServed() { // PK12235, check for a partial or full stop if (getChannel().isStopping()) { // channel has stopped, no more keep-alives if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Channel stopped, disa...
java
@Override public void ready(VirtualConnection inVC) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "ready: " + this + " " + inVC); } this.myTSC = (TCPConnectionContext) getDeviceLink().getChannelAccessor(); HttpInboundServiceContextImpl ...
java
protected void processRequest() { final int timeout = getHTTPContext().getReadTimeout(); final TCPReadCompletedCallback callback = HttpICLReadCallback.getRef(); // keep looping on processing information until we fully parse the message // and hand it off, or until the reads for more dat...
java
private boolean handleNewInformation() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Parsing new information: " + getVirtualConnection()); } final HttpInboundServiceContextImpl sc = getHTTPContext(); if (!isPartiallyParsed()) { ...
java
private void handleGenericHNIError(Throwable t, HttpInboundServiceContextImpl hisc) { hisc.setHeadersParsed(); sendErrorMessage(t); setPartiallyParsed(false); }
java
private void handleNewRequest() { // if this is an http/2 request, skip to discrimination if (!isAlpnHttp2Link(this.vc)) { final HttpInboundServiceContextImpl sc = getHTTPContext(); // save the request info that was parsed in case somebody changes it sc.setRequestVer...
java
private void sendErrorMessage(Throwable t) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Sending a 400 for throwable [" + t + "]"); } sendErrorMessage(StatusCodes.BAD_REQUEST); }
java
private void sendErrorMessage(StatusCodes code) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Sending an error page back [code: " + code + "]"); } try { getHTTPContext().sendError(code.getHttpError()); } catch (MessageSentExcep...
java
private void handlePipeLining() { HttpServiceContextImpl sc = getHTTPContext(); WsByteBuffer buffer = sc.returnLastBuffer(); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(tc, "Pipelined request found: " + buffer); } sc.clear(); //...
java
@Override public void error(VirtualConnection inVC, Throwable t) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "error() called on " + this + " " + inVC); } try { close(inVC, (Exception) t); } catch (ClassCastException cce) {...
java